MergePeerProfile
Merge the peer profile associated with the provided externalId with the current profile.
NOTE: If using the BrainCloudWrapper, once the merge is complete you should call SetStoredProfileId
in the BrainCloudWrapper with the profileId returned in the Merge call.
Service | Operation |
---|---|
identity | MERGE_PEER_PROFILE |
Method Parameters
Parameter | Description |
---|---|
peer | Name of the peer service |
externalId | User ID |
authenticationToken | Password or client side token |
authenticationType | Type of authentication. Full list of types can be found here. |
externalAuthName | The name of the external authentication mechanism (optional, used for custom authentication types) |
Usage
http://localhost:3000
- C#
- C++
- Objective-C
- Java
- JavaScript
- Dart
- Cloud Code
- Raw
// cloud code only
// cloud code only
// cloud code only
// cloud code only
// cloud code only
// Cloud Code only. To view example, switch to the Cloud Code tab
var peer = "gameloot";
var externalId = "UserID";
var authenticationToken = "token";
var authenticationType = "email";
var externalAuthName = "";
var identityProxy = bridge.getIdentityServiceProxy();
identityProxy.mergePeerProfile(peer, externalId, authenticationToken, authenticationType, externalAuthName);
{
"service": "identity",
"operation": "MERGE_PEER_PROFILE",
"data": {
"peer": "gameloot",
"externalId": "email@email.com",
"authenticationToken": "email@email.com",
"authenticationType": "Email",
"externalAuthName": ""
}
}
JSON Response
{
"data":{
"profileId":"f94f7e2d-3cdd-4fd6-9c28-392f7875e9df"
},
"status":200
}
Common Error Code
Status Codes
Code | Name | Description |
---|---|---|
40211 | DUPLICATE_IDENTITY_TYPE | Returned when trying to attach an identity type that already exists for that profile. For instance you can have only one Steam identity for a profile. |