Authentication
Generate short lived bearer token
Generates and returns a bearer token. Behavior of this API differs on the basis of the auth mechanism used to make the request.
- For API key auth, this API generates a JWT token whcih is valid for 24 hours and returns it.
- For JWT bearer auth, returns the same JWT token in response For information on how to generate API token, refer Generating New API Keys section of docs.
POST
/
authenticate
curl --request POST \
--url https://api.togai.com/authenticate \
--header 'Authorization: <authorization>'
{
"token": "XlK5h64gNDBfMXAPKKGRmWjaxmXJJzDKIJNWqSWj"
}
Authorizations
Authorization
string
headerrequiredBearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Response
200 - application/json
token
string
requiredcurl --request POST \
--url https://api.togai.com/authenticate \
--header 'Authorization: <authorization>'
{
"token": "XlK5h64gNDBfMXAPKKGRmWjaxmXJJzDKIJNWqSWj"
}