Generating a Bearer Token

Bearer Tokens are essential for authenticating your API requests securely on QuantaAPI. Every request to our protected endpoints must include a valid token in the Authorization header.

🧾 What is a Bearer Token?

A Bearer Token is a time-sensitive, secure token generated using your API key. It is used to verify your identity when making requests to QuantaAPI.

Think of it as your “temporary access pass” – more secure than passing the API key directly with every request.

🚀 How to Generate a Bearer Token

To generate a token, make a POST request to the following endpoint:

POSThttps://cricket.quantaapi.com/api/v1/generate-token

Headers

Name
Value

Content-Type

application/json

Authorization

Bearer <token>

Response

{
    "status": "success",
    "message": "Token generate successfully.",
    "code": 200,
    "type": "SUCCESS",
    "data": {
        "created_at_utc": "2025-05-17T09:47:48Z",
        "valid_till_utc": "2025-05-17T10:47:48Z",
        "valid_for": "1 hour",
        "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiIxMjcuMC4wLjEiLCJpYXQiOjE3NDc0NzUyNjgsImV4cCI6MTc0NzQ3ODg2OCwidXNlcl9pZCI6OX0.Gjk77J30Y1-lkoI8_MVeGV_jNaVXY2Z11rxdj83S4N4"
    }
}

Last updated