Scopes are the permissions your app requests. The user sees them on the consent screen and can decline. Request the minimum your integration needs.
These are OAuth scopes, permissions on a token. They are unrelated to reward trigger scopes, which describe when a reward fires.
Requesting scopes
Pass a space-separated scope parameter to /authorize. You can also pass one
on refresh to narrow it.
scope=openid user:read activity:read reward:read
Your app can only request scopes it was registered with, plus openid,
profile and email, which every app may request. Asking for any other scope
fails the authorization rather than returning a token without it. The token
response lists the scopes actually granted in its scope field. Use that list,
not the one you asked for.
OpenID Connect scopes
openid adds an id_token to the token response, carrying sub, email and
email_verified. The ID token reference lists every
claim.
profile and email are accepted and change nothing. The ID token carries the
email address without email, and has no profile claims: read the user's name,
username and avatar from GET /users/me, with user:read.
A refresh token comes with every authorization code exchange, so there is no
scope to request for one. offline_access is accepted, on authorization and on
refresh, and left out of the granted scope.
Resource scopes
Other scopes take the form resource:action, and some add a sub-resource
(session:attendees:manage). The Scope Reference
lists every one, with the endpoints that require it, and each endpoint in the
API Reference names its own. Scope names can still change while
v1 is in preview, so read them from there rather than from a copy.
Sensitive scopes
A scope can be marked sensitive. The consent screen highlights it with an
extra warning. org:delete and wallet:decrypt are sensitive, and the
Scope Reference marks them.
Scope is necessary, not sufficient
For organization resources, the caller's role in the organization must also allow the action. A request with the right scope can still be refused, and the error says which side denied it. See Act as an Organization.
Consent
The first time a user authorizes your app, Davi shows a consent screen listing the requested scopes, with sensitive ones called out separately. Later authorizations for the same scopes skip the prompt. Users can revoke your app from their Davi settings at any time.
For server-to-server calls with no user, see client credentials.
Next
- Making Requests: call the API with your token.