API
Written By Valor Quest
Last updated 9 months ago
๐ Overview
With the Valor Quest API we can make sure that the user has successfully registered or has performed other verification logic operations in the application.
To check: Just get the API key through support and send the user's telegram ID and verify type to our address.
Note: Please keep the API key properly. If you forget it, please contact us to get it again.
Base URL: https://valorquest.org/api/v1
Authentication
All requests require an API access token.
๐ฎ API Endpoint
Endpoint: POST /task/verify
๐ค Request Format
{
"api_key": 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
"tg_user_id": ['1234567'],
"v_type": 1
}๐ Parameters
๐ VerifyType
๐ Example Request
Using fetch (POST):
const response = await fetch('https://valorquest.org/api/v1/task/verify', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
api_key: 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
tg_user_id: ['1234567'],
v_type:1
}),
});
const data = await response.json();api_key โ your token received from us
tg_user_id โ telegram user id
v_typeโ verify type
๐ฅ Response
โ
{
"status": 200,
"message":"success",
"tgIds":['12345678'] // Array of tgids verified by the task
}โ
{
"status": 401,
"message": "Api key verification failed"
}โ ๏ธ Error Codes
๐ Security Tips
Always use HTTPS
Keep your api secret