Who the token acts as
const url = 'https://app.lyra-docs.com/api/v1/me';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://app.lyra-docs.com/api/v1/me \ --header 'Authorization: Bearer <token>'Returns the person the token belongs to and the organization it works in. Use it to check a token works.
Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”OK
The person a token acts as, and the organization it works in.
object
The organization the token works in. A token only ever sees this one.
object
Example
{ "id": "0193a7c0-1a2b-7c3d-8e4f-5a6b7c8d9e0f", "name": "Sam Lee", "email": "sam@example.com", "organization": { "id": "0193a7bf-0000-7000-8000-00000000aa01", "name": "Example Inc", "role": "member" }, "token": { "id": "0193a7c7-5555-7aaa-8bbb-000000000006", "expiresAt": "2027-03-02T09:30:00.000Z" }}Headers
Section titled “Headers”How many requests the token can send in a minute
How many it has left this minute
Seconds until the count starts again
The id of this request. Send it to support if something goes wrong.
The token is missing, wrong, revoked or expired.
What went wrong.
object
object
A stable code to check in your code, such as page_not_found
A sentence for people, which can change
For invalid_request, each part of the request that was wrong
Example
{ "error": { "code": "unauthorized", "message": "Please sign in." }}Too many requests. Each token can send 120 requests a minute. Wait for the seconds in Retry-After.
What went wrong.
object
object
A stable code to check in your code, such as page_not_found
A sentence for people, which can change
For invalid_request, each part of the request that was wrong
Example
{ "error": { "code": "rate_limited", "message": "Too many requests. Try again in 21 seconds." }}Headers
Section titled “Headers”Seconds to wait before sending again