/api/apis/{api_server_id}/connect_app/{client_app_id}/scopesAuthenticatedSet a connected app's API scope allowances
Replaces which of the API server's scopes the connected client application may be granted. Restricting the user allowance, or removing a scope from it, also stops already-issued refresh tokens from carrying the removed scopes on their next rotation; a service-account scope applies from the app's next client_credentials grant.
put_api_apis_api_server_id_connect_app_client_app_id_scopesAPI serversAuthentication & permissionsAuthenticated
Any authenticated user
- Accepted credentials
- Auth server session (refresh token cookie)
cookie "refresh_token_<auth_server_app_id>" - Access token (cookie)
cookie "access_token_<auth_server_app_id>" - Access token (Bearer)
Authorization: Bearer <JWT>
- Auth server session (refresh token cookie)
- Who may call
- Any authenticated user
- Notes
- Organization owners/admins of the API server's owning organization, its owning user, or platform administrators.
Path parameters
| Name | Type | Description |
|---|---|---|
| api_server_id* | string | API server id |
| client_app_id* | string | Client application id |
Request body
Required
| Property | Type | Description |
|---|---|---|
| restrict_user_scopes* | boolean | |
| user_scopes* | string[] | maxItems: 100 |
| service_account_scopes* | string[] | maxItems: 100 |
Responses
| Property | Type | Description |
|---|---|---|
| success* | true | |
| policy* | AppApiScopePolicy | Which of the API server's scopes the connected app may be granted. |
| restrict_user_scopes* | boolean | |
| user_scopes* | string[] | |
| service_account_scopes* | string[] |
Example request
curl -X PUT 'https://auth.schemavaults.com/api/apis/<api_server_id>/connect_app/<client_app_id>/scopes' \
-b 'refresh_token_<auth_server_app_id>=<value>' \
-H 'Content-Type: application/json' \
-d '{
"restrict_user_scopes": true,
"user_scopes": [
"string"
],
"service_account_scopes": [
"string"
]
}'