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.
| Scope | Grants | Endpoints | Token |
|---|---|---|---|
remilia:stats.read | Read the account statistics of the authenticated user | GET /me/stats | User-delegated |
remilia:notifications.read | Read the notifications of the authenticated user | GET /me/notifications | User-delegated |
remilia:pokes.write | Poke other users, attributed to the authenticated user | POST /users/{handle}/poke, GET /users/{handle}/poke/cooldown | User-delegated |
remilia:social.read | Read the mutual friends of the authenticated user and another user | GET /users/{username}/mutual-friends | User-delegated |
remilia:social.write | Send, accept, and reject friend requests as the authenticated user | POST /friendship/request, POST /friendship/accept, POST /friendship/reject | User-delegated |
remilia:beetle.read | Read the Beetle game state and cards of the authenticated user | GET /me/beetle, GET /me/beetle/cards, GET /me/beetle/cooldowns | User-delegated |
remilia:ball.read | Read the Ball status of the authenticated user: the unread message count, the date status and partner, and the gallery progress | GET /ball/me | User-delegated |
remilia:chat.read | Read global chat messages | GET /global-chat/messages | User-delegated or app-only |
remilia:chat.write | Post to global chat as the authenticated user | POST /global-chat/messages | User-delegated |
remilia:directory.read | Resolve and enumerate public directory identities | POST /directory/resolve, GET /users | User-delegated or app-only |
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
Four endpoints need no remilia: scope:
GET /users/{username}needs no token.GET /ballandGET /ball/users/{handle}need no token.GET /merequires the token of a user. Theopenidscope is enough.
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.
