Skip to content

API reference

Scopes

Each RemiliaNET API scope, the endpoints that it allows, and the token kind that it accepts.

A scope is a named permission that an access token carries. A scoped endpoint returns 403 insufficient_scope when a valid token lacks its scope.

Scope reference

Most scopes need a user-delegated token from a Login client. Each endpoint link opens request and response examples for Remilia Jackson.

Scopes for public data

remilia:chat.read and remilia:directory.read cover public data. An app with a server reads this data with an app-only token from an API client. A Login client does not need these scopes when its user-facing features do not use them.

A user-delegated chat read also applies the hidden-user and privacy rules of that user. It suits an app that shows chat as that user sees it. A browser-only app has no client secret, so it reads with the token of the user.

Endpoints without a scope

Two endpoints need no remilia: scope:

Issued scopes

The scope field of the token response lists the granted permissions, separated by spaces:

{
  "scope": "openid remilia:stats.read remilia:pokes.write"
}

For more information about grants, see App permissions.

Errors

A valid token without the required scope returns this error:

{
  "error": {
    "code": "insufficient_scope",
    "message": "scope remilia:pokes.write required"
  }
}

An endpoint that requires the token of a user returns 403 requires_user for an app-only token. Only a Login client obtains the token of a user.