Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Separate OAuth2 Scopes table #5130

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/Change_Log.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Application command permissions have been updated to add more granular control a
#### Breaking changes

- Bearer tokens are now required to edit command permissions. Bearer tokens are tokens tied to an authenticating user's permissions, and can be [retrieved using OAuth](#DOCS_TOPICS_OAUTH2). The user must have permission to manage the guild and roles.
- [`applications.commands.permissions.update`](#DOCS_TOPICS_OAUTH2/shared-resources-oauth2-scopes) scope was added as a requirement to edit command permissions.
- [`applications.commands.permissions.update`](#DOCS_TOPICS_OAUTH2/oauth2-scopes) scope was added as a requirement to edit command permissions.
- Disabled the batch editing endpoint ([`PUT /applications/{application.id}/guilds/{guild.id}/commands/permissions`](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/batch-edit-application-command-permissions)).

#### Other changes
Expand Down
2 changes: 1 addition & 1 deletion docs/Getting_Started.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ For now, we’ll just add two scopes:
- `applications.commands` lets your app create commands in guilds its installed
- `bot` is to enable your bot user. After you click bot, you can also add different user permissions to the bot. For now, just check **Send Messages**.

See a list of all [OAuth2 scopes](#DOCS_TOPICS_OAUTH2/shared-resources-oauth2-scopes), or read more on [user permissions](#DOCS_TOPICS_PERMISSIONS) in the documentation.
See a list of all [OAuth2 scopes](#DOCS_TOPICS_OAUTH2/oauth2-scopes), or read more on [user permissions](#DOCS_TOPICS_PERMISSIONS) in the documentation.

![URL generator screenshot](url-generator.png)

Expand Down
2 changes: 1 addition & 1 deletion docs/interactions/Application_Commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ Application command permissions allow your app to enable or disable commands for

A command's current permissions can be retrieved using the [`GET /applications/{application.id}/guilds/{guild.id}/commands/{command.id}/permissions`](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/get-application-command-permissions) endpoint. The response will include an array called `permissions` with associated IDs and permission types.

Command permissions can be updated with the [`PUT /applications/{application.id}/guilds/{guild.id}/commands/{command.id}/permissions`](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/edit-application-command-permissions) endpoint. To call the endpoint, apps must use a Bearer token that's authorized with the [`applications.commands.permissions.update`](#DOCS_TOPICS_OAUTH2/shared-resources-oauth2-scopes) scope from a user with sufficient permissions. For their permissions to be considered sufficient, all of the following must be true for **the authenticating user** (not your app or bot user):
Command permissions can be updated with the [`PUT /applications/{application.id}/guilds/{guild.id}/commands/{command.id}/permissions`](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/edit-application-command-permissions) endpoint. To call the endpoint, apps must use a Bearer token that's authorized with the [`applications.commands.permissions.update`](#DOCS_TOPICS_OAUTH2/oauth2-scopes) scope from a user with sufficient permissions. For their permissions to be considered sufficient, all of the following must be true for **the authenticating user** (not your app or bot user):
- Has [permission to Manage Guild and Manage Roles](#DOCS_TOPICS_PERMISSIONS) in the guild where the command is being edited
- Has the ability to run the command being edited
- Has permission to manage the resources that will be affected (roles, users, and/or channels depending on the [permission types](#DOCS_INTERACTIONS_APPLICATION_COMMANDS/application-command-permissions-object-application-command-permission-type))
Expand Down
8 changes: 4 additions & 4 deletions docs/resources/Application.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@

###### Install Params Structure

| Field | Type | Description |
| ----------- | ---------------- | ---------------------------------------------------------------------------------------------------------- |
| scopes | array of strings | the [scopes](#DOCS_TOPICS_OAUTH2/shared-resources-oauth2-scopes) to add the application to the server with |
| permissions | string | the [permissions](#DOCS_TOPICS_PERMISSIONS) to request for the bot role |
| Field | Type | Description |
| ----------- | ---------------- | ----------------------------------------------------------------------------------------- |
| scopes | array of strings | the [scopes](#DOCS_TOPICS_OAUTH2/oauth2-scopes) to add the application to the server with |
| permissions | string | the [permissions](#DOCS_TOPICS_PERMISSIONS) to request for the bot role |
Loading