Check that your token works
Check that your token works
Tells whether a token is accepted, and for which client. Needs no permission: any valid token can call it.
Endpoint#
GET/api/v1/ping
Example request#
curl "https://votre-entreprise.evyooht.com/api/v1/ping" \
-H "Authorization: Bearer evy_at_votre_jeton"$headers = @{ Authorization = "Bearer evy_at_votre_jeton" }
Invoke-RestMethod -Uri "https://votre-entreprise.evyooht.com/api/v1/ping" -Headers $headersconst response = await fetch("https://votre-entreprise.evyooht.com/api/v1/ping", {
headers: { Authorization: "Bearer evy_at_votre_jeton" },
});
const data = await response.json();
console.log(data);$ch = curl_init("https://votre-entreprise.evyooht.com/api/v1/ping");
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Authorization: Bearer evy_at_votre_jeton"],
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($data);import requests
response = requests.get(
"https://votre-entreprise.evyooht.com/api/v1/ping",
headers={"Authorization": "Bearer evy_at_votre_jeton"},
)
print(response.json())Response#
The token is accepted.
Example response#
{
"ok": true,
"client": "Web shop",
"scopes": [
"products:read",
"invoices:read"
]
}Errors#
The error format and the full list of codes are described in Errors.
| Status | When |
|---|---|
401 | The token is missing, malformed, expired or revoked (missing_token or invalid_token). Ask for a new token. |
429 | Too many requests this minute. Wait for the number of seconds in the Retry-After header. |