Skip to main content

OAuth scopes

Each access token holds scopes that determine what your app can do. Request only the scopes your app uses: users see one consent line per scope. Changes to scopes are listed in the API changelog.

How scopes work​

Each area has a read scope and a write scope. A read scope only allows endpoints that change nothing. This depends on what the endpoint does, not its HTTP method: a search can use POST, and an action can use GET.

A write scope does not include the read scope. Request both if your app needs both. An endpoint requires every scope it lists. Each endpoint's scopes appear in its security block in the API reference.

Scope catalog​

ScopeAllows
profileThe user's id, username and avatar
profile:read / profile:writeThe user's own profile, settings, kink profile, stats
users:read / users:writeMember search, blocks, reports
locks:read / locks:writeThe user's locks and their extensions
shared_locks:read / shared_locks:writeThe user's shared locks
keyholder:read / keyholder:writeLocks the user keyholds
messaging:read / messaging:writePrivate conversations and attachments
notifications:read / notifications:writeNotifications
calendar:read / calendar:writeCalendar events
posts:read / posts:writeActivity feed and keyholding request posts
developerExtensions API and developer extension management

For OAuth apps, profile is always included. The 18 read/write scopes are offered on the consent screen. The developer scope is not offered to OAuth apps; it comes only with the developer token.

Legacy scopes​

The following scopes stay valid with no end date. Each counts as its read and write pair.

Legacy scopeCounts as
lockslocks:read and locks:write
shared_locksshared_locks:read and shared_locks:write
keyholderkeyholder:read and keyholder:write
messagingmessaging:read and messaging:write

New apps are offered the granular scopes only. Apps that hold legacy scopes also hold the granular ones. Use granular scopes for new work.

Email addresses are never shared​

There is no email scope: an authorize URL that requests it fails with invalid_scope before the consent screen. GET /auth/profile returns the email and billingEmail fields as null for every OAuth app and developer token. ID tokens and userinfo do not carry email addresses either. Identify users by their user id.

Profile edits through PATCH /current-user or POST /auth/profile that change the email return 400. Other profile fields remain editable with profile:write.

Endpoints without a scope​

These endpoints accept any valid token without requiring a scope:

  • Public member profiles: GET /users/profile/:username, GET /users/profile/:username/details, GET /users/profile/by-id/:userId, GET /user-profile/:username/* and GET /achievements/user/:userId.
  • File uploads: POST /files/upload.

Public locks, pillory search, shared links, explore categories, the extensions list, session offer token lookup, community event categories, public Academy pages, GET /data/countries and GET /data/countries/:code work without a token and accept any valid token.

Other endpoints that work with or without a token check the required scope when you send a token. For example, GET /extensions/tasks/votes/:taskVoteId is open anonymously and needs locks:read with a token. Other access rules for an endpoint still apply, including account permissions and community access.

Reserved for the Chaster app​

Only endpoints in the API reference are supported for apps. These endpoints return 403 to OAuth apps and developer tokens:

  • GET /auth/totp/status
  • POST /auth/totp/disable
  • GET /auth/profile/update

GET /users/search/by-discord-id/:discordId is reserved for the Chaster Discord bot and returns 401 to OAuth apps and developer tokens.

Developer token​

A developer token acts as the account that generated it. It holds every scope listed on this page, including developer and the legacy scopes. It is still treated as an app token: email fields remain null, the reserved endpoints above stay closed, and edits to the email return 400.

See Developer token to generate one.