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 time. Missing on personal access tokens with no expiration.
integer
jti
Personal access token ID. Missing on login tokens.
string
iss
Token issuer
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.
integer
Example
{ "id": 1, "name": "John Testomato", "email": "user@email.com", "exp": 1825840726, "jti": "2", "iss": "testomato.com/api", "iat": 1668074326, "nbf": 1668074326}The token is missing, invalid, expired or revoked.