Skip to main content
Tutorial for Valor Quest

API

Written By Valor Quest

Last updated Over 1 year 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

Parameter

Type

Required

Description

api_key

String

Yes

API access token

tg_user_id

String[]

Yes

Telegram user ids

v_type

Integer

Yes

Verify type

📌 VerifyType

V_Type

Description

1

Whether the user has created a game account

2

Whether the user's battle soul level has reached level 5

...

...

🌟 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

Status Code

Description

400

Missing/Invalid required parameters

401

Invalid api key

500

Business errors, such as user not found, etc.

🔒 Security Tips

  • Always use HTTPS

  • Keep your api secret