You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Document the new /provisional-accounts/unmerge/bot endpoint that allows unmerging provisional accounts using just the bot token and external_user_id, without requiring an external auth token. This ensures identities can always be removed even if the external auth token is no longer accessible.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>
If you have a server backend, you'll want to use the server-to-server unmerge endpoint rather than the SDK helper method to maintain better security and control over the unmerge process.
497
497
</Info>
498
498
499
+
#### Unmerging with Bot Token Endpoint
500
+
501
+
If you're using the [Bot Token Endpoint](/docs/discord-social-sdk/development-guides/using-provisional-accounts#server-authentication-with-bot-token-endpoint) for authentication, you can unmerge accounts without an external auth token.
502
+
503
+
```python
504
+
import requests
505
+
506
+
API_ENDPOINT='https://discord.com/api/v10'
507
+
BOT_TOKEN='YOUR_BOT_TOKEN'
508
+
509
+
defunmerge_provisional_account(external_user_id):
510
+
data = {
511
+
'external_user_id': external_user_id # identifier used in the /token/bot endpoint
512
+
}
513
+
headers = {
514
+
'Content-Type': 'application/json',
515
+
'Authorization': f'Bot {BOT_TOKEN}'
516
+
}
517
+
r = requests.post('%s/provisional-accounts/unmerge/bot'%API_ENDPOINT, json=data, headers=headers)
518
+
r.raise_for_status()
519
+
```
520
+
499
521
### Unmerging Provisional Accounts for Public Clients
500
522
501
523
<PublicClient />
@@ -621,4 +643,4 @@ import {UserStatusIcon} from '/snippets/icons/UserStatusIcon.jsx'
0 commit comments