Verify your key
GET
/auth/verify
const url = 'https://www.glitter.io/api/v1/auth/verify';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://www.glitter.io/api/v1/auth/verify \ --header 'Authorization: Bearer <token>'Confirms the key works and returns what it is: its name, home (one team or one organization), scopes and expiry. The first call to make after wiring a key in.
Authorizations
Section titled “ Authorizations ”Responses
Section titled “ Responses ”Successful response
Media type application/json
object
data
required
object
id
required
string
name
required
string
home
required
object
type
required
string
id
required
string
scopes
required
Array<string>
expires_at
required
string | null
Example
{ "data": { "home": { "type": "team" }, "scopes": [ "guides:read" ] }}Invalid request
Media type application/json
object
type
string
title
string
status
integer
detail
string
code
string
request_id
string
Example
{ "type": "https://www.glitter.io/developers/api-reference#errors", "title": "Invalid request", "detail": "limit: Too big", "code": "invalid_request", "request_id": "3f2a9c1e-7b4d-4e0a-9c2f-1d5e6a7b8c9d"}Invalid or expired key
Media type application/json
object
type
string
title
string
status
integer
detail
string
code
string
request_id
string
Example
{ "type": "https://www.glitter.io/developers/api-reference#errors", "title": "Invalid API key", "detail": "This API key is not known.", "code": "invalid_key", "request_id": "3f2a9c1e-7b4d-4e0a-9c2f-1d5e6a7b8c9d"}Scope missing or API turned off
Media type application/json
object
type
string
title
string
status
integer
detail
string
code
string
request_id
string
Example
{ "type": "https://www.glitter.io/developers/api-reference#errors", "title": "Scope missing", "detail": "This key lacks the members:read scope.", "code": "scope_missing", "request_id": "3f2a9c1e-7b4d-4e0a-9c2f-1d5e6a7b8c9d"}Rate limited
Media type application/json
object
type
string
title
string
status
integer
detail
string
code
string
request_id
string
Example
{ "type": "https://www.glitter.io/developers/api-reference#errors", "title": "Too many requests", "detail": "600 requests per minute per key.", "code": "rate_limited", "request_id": "3f2a9c1e-7b4d-4e0a-9c2f-1d5e6a7b8c9d"}Internal error
Media type application/json
object
type
string
title
string
status
integer
detail
string
code
string
request_id
string
Example
{ "type": "https://www.glitter.io/developers/api-reference#errors", "title": "Something went wrong", "detail": "Something went wrong on our side.", "code": "internal_error", "request_id": "3f2a9c1e-7b4d-4e0a-9c2f-1d5e6a7b8c9d"}