GET/v1/tokens/verify

Verify a token

Security: Bearer Auth

Provide your bearer token in the Authorization header when making requests to protected resources.

Example: Authorization: Bearer 123

Responses

StatusMeaningDescription
200OKReturns that the given API token is valid
401UnauthorizedReturns an error message if the token is invalid
500Internal Server ErrorInternal Server Error

Response Schema

result:object
success:boolean
Whether the API call was successful
errors:[object]
messages:[object]

Request

GET
/v1/tokens/verify
curl --request GET \
  --url https://api.onlineornot.com/v1/tokens/verify \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer {access-token}'

Response

{
  "result": {
    "id": "a1b2c3d4",
    "status": "active"
  },
  "success": true,
  "errors": [],
  "messages": []
}

GET/v1/tokens/permissions

Retrieve a token's permissions

Security: Bearer Auth

Provide your bearer token in the Authorization header when making requests to protected resources.

Example: Authorization: Bearer 123

Responses

StatusMeaningDescription
200OKReturns the permissions of a given API token
500Internal Server ErrorInternal Server Error

Response Schema

result:object
success:boolean
Whether the API call was successful
errors:[object]
messages:[object]

Request

GET
/v1/tokens/permissions
curl --request GET \
  --url https://api.onlineornot.com/v1/tokens/permissions \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer {access-token}'

Response

{
  "result": {
    "permissions": [
      "uptime_checks (read)"
    ]
  },
  "success": true,
  "errors": [],
  "messages": []
}

Was this page helpful?