Who this bearer is
const url = 'https://api.sloose.com/auth/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://api.sloose.com/auth/me \ --header 'Authorization: Bearer <token>'The org, the user and the role behind the bearer, plus whether the org has a stored Zoho connection. via says whether you authenticated with a session token or an org API token — the same route answers both, which is what makes a token a drop-in for a session.
Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”The identity behind the bearer.
object
object
Whether the org has granted offline scope for server-side discovery.
object
Expiry, seconds since the epoch.
Example
{ "role": "owner", "via": "session"}The session is unknown, expired or no longer a membership (code: AUTH_REQUIRED). An API token that was revoked or expired says so (code: TOKEN_REVOKED, TOKEN_EXPIRED); one whose org has been deleted answers ORG_NOT_FOUND; one whose member or user row has gone answers MEMBERSHIP_GONE.
The error envelope every non-2xx answer uses.
object
Human-readable explanation.
Machine-readable reason. Absent on a few legacy 400s.
Examplegenerated
{ "error": "example", "code": "example"}An administrator has revoked your access to the org (code: ACCESS_REVOKED).
The error envelope every non-2xx answer uses.
object
Human-readable explanation.
Machine-readable reason. Absent on a few legacy 400s.
Examplegenerated
{ "error": "example", "code": "example"}