Verify API token
GET
/authenticate
const url = 'https://testomato.com/api/authenticate';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://testomato.com/api/authenticate \ --header 'Authorization: Bearer <token>'Calling this endpoint verifies the validity of your token.
The response contains user information such as email and id.
Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”Successfully authenticated using API token
Media typeapplication/json
object
id
User ID
integer
name
User name
string
email
User email
string
exp
Expiration date
integer
tid
Token identifier
string
iat
The “iat” (issued at) claim identifies the time at which the JWT was issued. This claim can be used to determine the age of the JWT.
integer
nbf
The “nbf” (not before) claim identifies the time before which the JWT MUST NOT be accepted for processing.
string
Example
{ "id": 1, "name": "John Testomato", "email": "user@email.com", "exp": 1825840726, "tid": "e2ew1g30xl", "iat": 1668074326, "nbf": 1668074326}The API token is missing, malformed or expired. Request a new one from
POST /api/authenticate.
Media typeapplication/json
object
message
Error message text
string
code
Error code number
integer
ok
boolean
error
boolean
Example
{ "message": "Access denied! Please log in to access this resource.", "code": 401, "ok": false, "error": true}The token is valid but the operation is not allowed. Two distinct causes:
- the subscription plan does not include API access — every endpoint returns this, regardless of the resource
- the account lacks the required role on the project — reading needs
read, changing checks needseditTests, and so on. See Project permissions.
Media typeapplication/json
object
message
Error message text
string
code
Error code number
integer
ok
boolean
error
boolean
Example
{ "message": "Sorry! Your current plan does not support access to Testomato API.", "code": 403, "ok": false, "error": true}