@@ -95,10 +95,10 @@ If you have `Public Client` enabled on your Discord app, you can use the followi
9595void AuthenticateUser (std::shared_ptr<discordpp::Client> client) {
9696 // Get your external auth token (Steam, OIDC, etc.)
9797 std ::string externalToken = GetExternalAuthToken ();
98-
98+
9999 // Get provisional token from Discord
100- client - > GetProvisionalToken (DISCORD_APPLICATION_ID ,
101- discordpp ::AuthenticationExternalAuthType ::OIDC ,
100+ client - > GetProvisionalToken (DISCORD_APPLICATION_ID ,
101+ discordpp ::AuthenticationExternalAuthType ::OIDC ,
102102 externalToken ,
103103 [client ](discordpp ::ClientResult result , std ::string accessToken , std ::string refreshToken , discordpp ::AuthorizationTokenType tokenType , int32_t expiresIn , std ::string scope ) {
104104 if (result.Successful()) {
@@ -222,7 +222,7 @@ client->UpdateProvisionalAccountDisplayName("CoolPlayer123", [](discordpp::Clien
222222
223223## Merging Provisional Accounts
224224
225- When a player wants to convert their provisional acount to a full Discord account.
225+ When a player wants to convert their provisional account to a full Discord account.
226226
227227### Merging Provisional Accounts for Public Clients
228228
@@ -255,7 +255,7 @@ client->Authorize(args, [client, codeVerifier](discordpp::ClientResult result, s
255255 std::cerr << " ❌ Authorization Error: " << result .Error () << std ::endl ;
256256 } else {
257257 std::cout << " ✅ Authorization successful! Next step: GetTokenFromProvisionalMerge \n " ;
258-
258+
259259 // Retrieve your external auth token
260260 std ::string externalAuthToken = GetExternalAuthToken ();
261261
@@ -290,12 +290,12 @@ If you are not using the [`Client::GetTokenFromProvisionalMerge`] or [`Client::G
290290
291291```python
292292import requests
293-
293+
294294API_ENDPOINT = 'https://discord.com/api/v10'
295295CLIENT_ID = '332269999912132097'
296296CLIENT_SECRET = '937it3ow87i4ery69876wqire'
297297EXTERNAL_AUTH_TYPE = 'OIDC'
298-
298+
299299def exchange_code_with_merge(code, redirect_uri, external_auth_token):
300300 data = {
301301 'grant_type': 'authorization_code',
@@ -316,12 +316,12 @@ def exchange_code_with_merge(code, redirect_uri, external_auth_token):
316316
317317``` python
318318import requests
319-
319+
320320API_ENDPOINT = ' https://discord.com/api/v10'
321321CLIENT_ID = ' 332269999912132097'
322322CLIENT_SECRET = ' 937it3ow87i4ery69876wqire'
323323EXTERNAL_AUTH_TYPE = ' OIDC'
324-
324+
325325def exchange_device_code_with_merge (device_code ):
326326 data = {
327327 ' grant_type' : ' urn:ietf:params:oauth:grant-type:device_code' ,
@@ -349,6 +349,16 @@ def exchange_device_code_with_merge(device_code):
349349}
350350```
351351
352+ ### Data Migration During Merging
353+
354+ When a user merges their provisional account with a Discord account, the following data is automatically transferred:
355+
356+ * ** ✅ Friends** : All In-game and Discord friendships made through the provisional account
357+ * ** ✅ Lobby Memberships** : Active and historical lobby participation
358+ * ** ✅ DM Messages** : Direct messages and history
359+
360+ This migration ensures users don't lose their social connections built while using the provisional account.
361+
352362---
353363
354364## Unmerging Provisional Accounts
@@ -460,6 +470,19 @@ def unmerge_provisional_account(external_auth_token):
460470If 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.
461471:::
462472
473+ ### Data Migration During Unmerging
474+
475+ When a user unmerges their account, a new provisional account is created with a new user ID. The relationship transfer follows these rules:
476+
477+ * **✅ In-game friends**: All copied to the new provisional account
478+ * **✅ Discord friends who use this application**: Copied to the provisional account
479+ * **❌ Discord friends who don't use this application**: Not transferred
480+ * **❌ DM message history**: Not moved to provisional accounts
481+
482+ :::info
483+ Provisional accounts can have Discord friends, but can only message these friends when actively playing the game.
484+ :::
485+
463486---
464487
465488## Next Steps
0 commit comments