Check your key
GET
/ping
const url = 'https://api.mayottehub.com/v1/ping';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://api.mayottehub.com/v1/ping \ --header 'Authorization: Bearer <token>'Answers with the company your key belongs to and what it may do. Needs the ping scope.
Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”The key works.
Media typeapplication/json
object
ok
required
boolean
partner
required
The company the key belongs to.
string
scopes
required
Array<string>
time
required
string format: date-time
Example
{ "ok": true, "partner": "Your company", "scopes": [ "ping" ]}No key (no_key), a key that is not valid (bad_key), revoked (revoked) or ended (expired); for an event
also a missing or old time (no_timestamp, old_timestamp) or a missing or wrong signature (no_signature,
bad_signature).
Media typeapplication/json
object
error
required
Words for a person. They may change.
string
code
required
What your program should read.
string
Example
{ "code": "bad_json"}The key may not do this (scope), or the call came from an address it does not allow (ip).
Media typeapplication/json
object
error
required
Words for a person. They may change.
string
code
required
What your program should read.
string
Example
{ "code": "bad_json"}Too many calls (rate). Wait for the retry-after header, in seconds.
Media typeapplication/json
object
error
required
Words for a person. They may change.
string
code
required
What your program should read.
string
Example
{ "code": "bad_json"}Headers
Section titled “Headers”retry-after
integer