Skip to content

Commit c01d51c

Browse files
spenhandmarkmandel
andauthored
Introduce provisional bot API + blanket improvements on docs (discord#7837)
* introduce provisional bot API + blanket improvements on docs * tweaks * Update docs/discord-social-sdk/development-guides/using-provisional-accounts.mdx Co-authored-by: Mark Mandel <mark.mandel@discordapp.com> * Update docs/discord-social-sdk/development-guides/using-provisional-accounts.mdx Co-authored-by: Mark Mandel <mark.mandel@discordapp.com> * Update docs/discord-social-sdk/development-guides/using-provisional-accounts.mdx Co-authored-by: Mark Mandel <mark.mandel@discordapp.com> * Apply suggestions from code review Co-authored-by: Mark Mandel <mark.mandel@discordapp.com> * feedback * npm run fix:tables --------- Co-authored-by: Mark Mandel <mark.mandel@discordapp.com>
1 parent 8bb28a1 commit c01d51c

File tree

2 files changed

+258
-155
lines changed

2 files changed

+258
-155
lines changed

docs/discord-social-sdk/development-guides/account-linking-with-discord.mdx

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ For OAuth2 to work correctly, you must **register the correct redirect URIs** fo
6161
| **Desktop** | `http://127.0.0.1/callback` |
6262
| **Mobile** | `discord-APP_ID:/authorize/callback` _(replace `APP_ID` with your Discord application ID)_ |
6363

64-
### Step 1: Request Authorization
64+
### Step 1: Request Authorization
6565

6666
The SDK provides helper methods to simplify OAuth2 login.
6767

@@ -277,6 +277,13 @@ def revoke_token(access_or_refresh_token):
277277
r.raise_for_status()
278278
```
279279
280+
### Handling User Initiated Revocation
281+
282+
Users can unlink their account by removing access to your application on their Discord `User Settings -> Authorized Apps` page.
283+
284+
If you would like to be notified when a user unlinks this way, you can [configure you application to listen for the `APPLICATION_DEAUTHORIZED` webhook event](/docs/events/webhook-events#application-deauthorized).
285+
Otherwise, you will know that the user has unlinked because their access token and refresh token (if you have one) will be invalidated.
286+
280287
---
281288
282289
## Next Steps
@@ -292,7 +299,7 @@ Now that you've successfully implemented account linking with Discord, you can i
292299
</Card>
293300
<Card title="Setting Rich Presence" link="/docs/discord-social-sdk/development-guides/setting-rich-presence" icon="UserStatusIcon">
294301
Display game status and information to Discord friends.
295-
</Card>
302+
</Card>
296303
</Container>
297304
298305
<SupportCallout />
@@ -311,4 +318,4 @@ Now that you've successfully implemented account linking with Discord, you can i
311318
[`Client::GetDefaultPresenceScopes`]: https://discord.com/developers/docs/social-sdk/classdiscordpp_1_1Client.html#a7648bd1d2f7d9a86ebd0edb8bef12b5c
312319
[`Client::GetToken`]: https://discord.com/developers/docs/social-sdk/classdiscordpp_1_1Client.html#aaee636f91fb1ea3465157c20313b702c
313320
[`Client::RefreshToken`]: https://discord.com/developers/docs/social-sdk/classdiscordpp_1_1Client.html#a187af0f99f94b3b9a4ad4302f6a443e7
314-
[`Client::UpdateToken`]: https://discord.com/developers/docs/social-sdk/classdiscordpp_1_1Client.html#a606b32cef7796f7fb91c2497bc31afc4
321+
[`Client::UpdateToken`]: https://discord.com/developers/docs/social-sdk/classdiscordpp_1_1Client.html#a606b32cef7796f7fb91c2497bc31afc4

0 commit comments

Comments
 (0)