Go to App

Generate a New API Token

POST/api/v1/api_tokens/generate

Generate a new API token for programmatic API access. The server creates the token and returns a confirmation message. To retrieve the token value and details, use the List tokens endpoint after generation.

Request Body

ParameterTypeDescription

namestringOptional display name for the token

bash
curl -X POST https://exportcomments.com/api/v1/api_tokens/generate \
-H "X-AUTH-TOKEN: your-api-key" \
-H "Content-Type: application/json"
Response200
json
{
"message": "user.api.token_generated"
}
💡
Retrieving the generated token

The generate endpoint only confirms that the token was created. To access the token value, UUID, and expiry details, call the List tokens or Retrieve token endpoint after generation.