Generate authentication token
POST
/v1/api/tokenNo authCreates a JWT for API authentication using client credentials. Access tokens are valid for one hour - generate a new token each hour. Use it in the Authorization header as "Bearer {token}".
View full reference for this endpoint →Request body
clientIdrequiredYour Turnqey client ID.
clientSecretrequiredYour Turnqey client secret.
Response
result.tokenJWT bearer token.
result.expiresInToken lifetime in seconds.
Error responses
400Bad RequestMalformed request or missing/invalid parameter.
401UnauthorizedToken missing, expired, or invalid - request a new token.
403ForbiddenAccess denied or partner not authorized for this resource.
404Not FoundResource not found - check the ID, collection, or identity.
422Unprocessable EntityRequest understood but cannot be processed.
429Too Many RequestsRate limited - back off and retry with jitter.
500Server ErrorUpstream or server failure - retry with backoff, then fail gracefully.
All errors share a standard envelope:
{
"isError": true,
"responseException": {
"exceptionMessage": "Request denied. Unauthorized access."
},
"statusCode": 401
}