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
Status Code 200
Name | Type | Required | Description |
---|---|---|---|
» result | object | true | none |
»» id | string | true | Token ID |
»» status | string | true | Status |
» success | boolean | true | Whether the API call was successful |
» errors | [object] | true | none |
»» code | number | true | none |
»» message | string | true | none |
»» type | string | false | none |
» messages | [object] | true | none |
»» code | number | true | none |
»» message | string | true | none |
»» type | string | false | none |
Status Code 401
Name | Type | Required | Description |
---|---|---|---|
» result | null | true | none |
» success | boolean | true | Whether the API call was successful |
» errors | [object] | true | none |
»» code | number | true | Error code |
»» message | string | true | A message to describe the error |
» messages | [object] | true | none |
»» code | number | true | none |
»» message | string | true | none |
»» type | string | false | none |
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
Status Code 200
Name | Type | Required | Description |
---|---|---|---|
» result | object | true | none |
»» permissions | [string] | true | none |
» success | boolean | true | Whether the API call was successful |
» errors | [object] | true | none |
»» code | number | true | none |
»» message | string | true | none |
»» type | string | false | none |
» messages | [object] | true | none |
»» code | number | true | none |
»» message | string | true | none |
»» type | string | false | none |
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": []
}