Generate Token

Generate Token

This endpoint allows you to generate an authentication token for accessing the API. The token is required for subsequent API requests that require authentication.


HTTP Request

POST {{host}}/api/v2/generate/token


Request Body

The request body must be sent as multipart/form-data with the following parameters:

ParameterTypeRequiredDescription
client_keystringYesThe client key for authentication.
client_secretstringYesThe client secret for authentication.
emailstringYesThe email address of the user.

Example Request Body

plaintextclient_key:     {{client-key}}client_secret:  {{client-secret}}email:          [email protected]

Response

A successful response returns a JSON object containing the generated token.

Response Schema

json{    "token": "string"}

Example Response

json{    "token":         "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9        ..."}

Postman Scripts

  • There is a post-response script that extracts the token from the response and sets it as an environment variable named user-token:
javascriptlet jsonData = pm.response.json();pm.environment.set('user-token', jsonData.    data.token);

Notes

  • Ensure that the client_key and client_secret are valid and correspond to your application credentials.

  • The token should be included in the Authorization header for subsequent API requests.

  • The endpoint expects the request body as multipart/form-data.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Query Params
string
Body Params
string
string
string
Response

Language
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here!