Check a key
GET
/organisation
const url = 'https://api-language-test.lernexa.com/api/v1/organisation';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-language-test.lernexa.com/api/v1/organisation \ --header 'Authorization: Bearer <token>'Whose key this is. A first call to check a key works. Safe to repeat.
Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”The key’s school.
Media typeapplication/json
The school a key belongs to.
object
id
required
Your school’s id.
string format: uuid
name
required
Your school’s name.
string
Example
{ "name": "Your School"}No key, an unknown key or a revoked key.
Media typeapplication/json
object
error
required
What went wrong, in a sentence.
string
Example generated
{ "error": "example"}Too many requests: 600 a minute per key, 1,200 a minute from one address. Wait a minute.
Media typeapplication/json
object
error
required
What went wrong, in a sentence.
string
Example generated
{ "error": "example"}