Songlist API
Version: 2.0.0
Export
/oauth2/validateValidate an access token
Reports what the credential in the Authorization header is and what it reaches. Accepts all three Songlist schemes: `Bearer` (OAuth2), `Streamer` and `User`. This deviates from RFC 7662 in one way: an invalid, unknown or expired credential is answered with **401**, not with `200 {"active": false}`. A 200 therefore always carries `active: true`.
Authorization
Requires a valid access token (no specific scope)
Responses
200OK
application/json
Schema
ValidateTokenBody
A URL to the JSON Schema for this object.
Always true — an invalid credential is answered with 401, not with active: false
scopes, client-credentials, streamer-token or user-token
OAuth2 client the token was issued to; absent for streamer and user tokens
Expiry as a Unix timestamp; absent when the token does not expire
Space-separated granted scopes. Absent — not empty — for streamer and user tokens, which carry no scopes and are not limited by any
Channel this credential reaches, when there is one
Identity id of the user behind the token; absent for a client_credentials token
Always access_token
Songlist username of that user, when it is known
Example
{
"$schema": "https://example.com",
"active": true,
"auth_type": "string",
"client_id": "string",
"exp": 0,
"scope": "string",
"streamer_id": 0,
"sub": "string",
"token_use": "string",
"username": "string"
}401Unauthorized
application/problem+json
Schema
ErrorModel
A URL to the JSON Schema for this object.
A human-readable explanation specific to this occurrence of the problem.
Optional list of individual error details
Array items:
ErrorDetail
Where the error occurred, e.g. 'body.items[3].tags' or 'path.thing-id'
Error message text
The value at the given location
A URI reference that identifies the specific occurrence of the problem.
HTTP status code
A short, human-readable summary of the problem type. This value should not change between occurrences of the error.
A URI reference to human-readable documentation for the error.
Example
{
"$schema": "https://example.com",
"detail": "string",
"errors": [
{
"location": "string",
"message": "string",
"value": null
}
],
"instance": "https://example.com",
"status": 0,
"title": "string",
"type": "about:blank"
}500Internal Server Error
application/problem+json
Schema
ErrorModel
A URL to the JSON Schema for this object.
A human-readable explanation specific to this occurrence of the problem.
Optional list of individual error details
Array items:
ErrorDetail
Where the error occurred, e.g. 'body.items[3].tags' or 'path.thing-id'
Error message text
The value at the given location
A URI reference that identifies the specific occurrence of the problem.
HTTP status code
A short, human-readable summary of the problem type. This value should not change between occurrences of the error.
A URI reference to human-readable documentation for the error.
Example
{
"$schema": "https://example.com",
"detail": "string",
"errors": [
{
"location": "string",
"message": "string",
"value": null
}
],
"instance": "https://example.com",
"status": 0,
"title": "string",
"type": "about:blank"
}