-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Update Application Endpoints #6297
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
Changes from all commits
695b2a4
60eebfe
23fe445
228dabd
70d7e5f
7354b38
3be238b
6139992
811e144
33eb268
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -4,32 +4,35 @@ | |||||
|
|
||||||
| ###### Application Structure | ||||||
|
|
||||||
| | Field | Type | Description | | ||||||
| |------------------------------------|----------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ||||||
| | id | snowflake | the id of the app | | ||||||
| | name | string | the name of the app | | ||||||
| | icon | ?string | the [icon hash](#DOCS_REFERENCE/image-formatting) of the app | | ||||||
| | description | string | the description of the app | | ||||||
| | rpc_origins? | array of strings | an array of rpc origin urls, if rpc is enabled | | ||||||
| | bot_public | boolean | when false only app owner can join the app's bot to guilds | | ||||||
| | bot_require_code_grant | boolean | when true the app's bot will only join upon completion of the full oauth2 code grant flow | | ||||||
| | terms_of_service_url? | string | the url of the app's terms of service | | ||||||
| | privacy_policy_url? | string | the url of the app's privacy policy | | ||||||
| | owner? | partial [user](#DOCS_RESOURCES_USER/user-object) object | partial user object containing info on the owner of the application | | ||||||
| | summary *(deprecated)* | string | **deprecated and will be removed in v11.** An empty string. | | ||||||
| | verify_key | string | the hex encoded key for verification in interactions and the GameSDK's [GetTicket](#DOCS_GAME_SDK_APPLICATIONS/getticket) | | ||||||
| | team | ?[team](#DOCS_TOPICS_TEAMS/data-models-team-object) object | if the application belongs to a team, this will be a list of the members of that team | | ||||||
| | guild_id? | snowflake | guild associated with the app. For example, a developer support server. | | ||||||
| | guild? | partial [guild](#DOCS_RESOURCES_GUILD/guild-object) object | a partial object of the associated guild | | ||||||
| | primary_sku_id? | snowflake | if this application is a game sold on Discord, this field will be the id of the "Game SKU" that is created, if exists | | ||||||
| | slug? | string | if this application is a game sold on Discord, this field will be the URL slug that links to the store page | | ||||||
| | cover_image? | string | the application's default rich presence invite [cover image hash](#DOCS_REFERENCE/image-formatting) | | ||||||
| | flags? | integer | the application's public [flags](#DOCS_RESOURCES_APPLICATION/application-object-application-flags) | | ||||||
| | approximate_guild_count? | integer | an approximate count of the app's guild membership. | | ||||||
| | tags? | array of strings | up to 5 tags describing the content and functionality of the application | | ||||||
| | install_params? | [install params](#DOCS_RESOURCES_APPLICATION/install-params-object) object | settings for the application's default in-app authorization link, if enabled | | ||||||
| | custom_install_url? | string | the application's default custom authorization link, if enabled | | ||||||
| | role_connections_verification_url? | string | the application's role connection verification entry point, which when configured will render the app as a verification method in the guild role verification configuration | | ||||||
| | Field | Type | Description | | ||||||
| |------------------------------------|----------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------| | ||||||
| | id | snowflake | ID of the app | | ||||||
| | name | string | Name of the app | | ||||||
| | icon | ?string | [Icon hash](#DOCS_REFERENCE/image-formatting) of the app | | ||||||
| | description | string | Description of the app | | ||||||
| | rpc_origins? | array of strings | List of RPC origin URLs, if RPC is enabled | | ||||||
| | bot_public | boolean | When `false`, only the app owner can add the app to guilds | | ||||||
| | bot_require_code_grant | boolean | When `true`, the app's bot will only join upon completion of the full OAuth2 code grant flow | | ||||||
| | bot? | partial [user](#DOCS_RESOURCES_USER/user-object) object | Partial user object for the bot user associated with the app | | ||||||
| | terms_of_service_url? | string | URL of the app's Terms of Service | | ||||||
| | privacy_policy_url? | string | URL of the app's Privacy Policy | | ||||||
| | owner? | partial [user](#DOCS_RESOURCES_USER/user-object) object | Partial user object for the owner of the app | | ||||||
| | summary *(deprecated)* | string | **deprecated and will be removed in v11.** An empty string. | | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If this is deprecated and always an empty string, maybe we can just undocument this field? |
||||||
| | verify_key | string | Hex encoded key for verification in interactions and the GameSDK's [GetTicket](#DOCS_GAME_SDK_APPLICATIONS/getticket) | | ||||||
| | team | ?[team](#DOCS_TOPICS_TEAMS/data-models-team-object) object | If the app belongs to a team, this will be a list of the members of that team | | ||||||
| | guild_id? | snowflake | Guild associated with the app. For example, a developer support server. | | ||||||
| | guild? | partial [guild](#DOCS_RESOURCES_GUILD/guild-object) object | Partial object of the associated guild | | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. AFAIK, the
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That's correct. |
||||||
| | primary_sku_id? | snowflake | If this app is a game sold on Discord, this field will be the id of the "Game SKU" that is created, if exists | | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "if exists" sounds weird, like the sentence didn't ended |
||||||
| | slug? | string | If this app is a game sold on Discord, this field will be the URL slug that links to the store page | | ||||||
| | cover_image? | string | App's default rich presence invite [cover image hash](#DOCS_REFERENCE/image-formatting) | | ||||||
| | flags? | integer | App's public [flags](#DOCS_RESOURCES_APPLICATION/application-object-application-flags) | | ||||||
| | approximate_guild_count? | integer | Approximate count of guilds the app has been added to | | ||||||
| | redirect_uris? | array of strings | Array of redirect URIs for the app | | ||||||
| | interactions_endpoint_url? | string | [Interactions endpoint URL](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/receiving-an-interaction) for the app | | ||||||
| | role_connections_verification_url? | string | Role connection verification URL for the app | | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe link to topic? |
||||||
| | tags? | array of strings | List of tags describing the content and functionality of the app. Max of 5 tags. | | ||||||
| | install_params? | [install params](#DOCS_RESOURCES_APPLICATION/install-params-object) object | Settings for the app's default in-app authorization link, if enabled | | ||||||
| | custom_install_url? | string | Default custom authorization URL for the app, if enabled | | ||||||
|
|
||||||
| ###### Example Application Object | ||||||
|
|
||||||
|
|
@@ -93,11 +96,36 @@ | |||||
|
|
||||||
| ###### 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 | [Scopes](#DOCS_TOPICS_OAUTH2/shared-resources-oauth2-scopes) to add the application to the server with | | ||||||
| | permissions | string | [Permissions](#DOCS_TOPICS_PERMISSIONS) to request for the bot role | | ||||||
|
|
||||||
| ## Get Current Application % GET /applications/@me | ||||||
|
|
||||||
| Returns the [application](#DOCS_RESOURCES_APPLICATION/application-object) object associated with the requesting bot user. | ||||||
|
|
||||||
| ## Edit Current Application % PATCH /applications/@me | ||||||
|
|
||||||
| Edit properties of the app associated with the requesting bot user. Only properties that are passed will be updated. Returns the updated [application](#DOCS_RESOURCES_APPLICATION/application-object) object on success. | ||||||
|
|
||||||
| > info | ||||||
| > All parameters to this endpoint are optional | ||||||
|
|
||||||
| ###### JSON Params | ||||||
|
|
||||||
| | Field | Type | Description | | ||||||
| |-----------------------------------|----------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------| | ||||||
| | custom_install_url | string | Default custom authorization URL for the app, if enabled | | ||||||
| | description | string | Description of the app | | ||||||
| | role_connections_verification_url | string | Role connection verification URL for the app | | ||||||
| | install_params | [install params](#DOCS_RESOURCES_APPLICATION/install-params-object) object | Settings for the app's default in-app authorization link, if enabled | | ||||||
| | flags \* | integer | App's public [flags](#DOCS_RESOURCES_APPLICATION/application-object-application-flags) | | ||||||
| | icon | ?[image data](#DOCS_REFERENCE/image-data) | Icon for the app | | ||||||
| | cover_image | ?[image data](#DOCS_REFERENCE/image-data) | Default rich presence invite cover image for the app | | ||||||
| | interactions_endpoint_url \*\* | string | [Interactions endpoint URL](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/receiving-an-interaction) for the app | | ||||||
| | tags | array of strings | List of tags describing the content and functionality of the app (max of 20 characters per tag). Max of 5 tags. | | ||||||
|
|
||||||
| \* Only limited intent flags (`GATEWAY_PRESENCE_LIMITED`, `GATEWAY_GUILD_MEMBERS_LIMITED`, and `GATEWAY_MESSAGE_CONTENT_LIMITED`) can be updated via the API. | ||||||
|
|
||||||
| \*\* To update an Interactions endpoint URL via the API, the URL must be valid according to the [Receiving an Interaction](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING/receiving-an-interaction) documentation. | ||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any chance the payload of this could be reworked to match what is returned from
/users/@me?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would suggest opening an issue about this for sure (if there hasn't been one opened already).