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
Status | Meaning | Description |
---|---|---|
200 | OK | Returns that the given API token is valid |
401 | Unauthorized | Returns an error message if the token is invalid |
500 | Internal Server Error | Internal Server Error |
Response Schema
result:object
success:boolean
Whether the API call was successful
errors:[object]
messages:[object]
Request
GET
/v1/tokens/verifycurl --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
Status | Meaning | Description |
---|---|---|
200 | OK | Returns the permissions of a given API token |
500 | Internal Server Error | Internal Server Error |
Response Schema
result:object
success:boolean
Whether the API call was successful
errors:[object]
messages:[object]
Request
GET
/v1/tokens/permissionscurl --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": []
}