MergeSteamIdentity
Merge the profile associated with the provided steam ID 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 |
Method Parameters
Parameter | Description |
---|---|
steamId | String representation of 64 bit steam id |
sessionTicket | The player's session ticket (hex encoded) |
Usage
http://localhost:3000
- C#
- C++
- Objective-C
- Java
- JavaScript
- Dart
- Cloud Code
- Raw
string steamId = "someId";
string sessionTicket = "someToken";
_bc.IdentityService.MergeSteamIdentity(
steamId,
sessionTicket,
SuccessCallback, FailureCallback);
const char * steamId = "someId";
const char * sessionTicket = "someToken";
_bc->getIdentityService()->mergeSteamIdentity(
steamId, sessionTicket, this);
- (void)mergeSteamIdentity:(NSString *)steamId
authenticationToken:(NSString *)sessionTicket
completionBlock:(BCCompletionBlock)cb
errorCompletionBlock:(BCErrorCompletionBlock)ecb
cbObject:(BCCallbackObject)cbObject;
public void mergeSteamIdentity(String steamId, String sessionTicket, IServerCallback callback)
_bc.identity.mergeSteamIdentity = function(steamId, sessionTicket, callback)
var steamId = "someId";
var sessionTicket = "someEncodedText";
ServerResponse result = await _bc.identityService.mergeSteamIdentity(steamId:steamId, sessionTicket:sessionTicket);
if (result.statusCode == 200) {
print("Success");
} else {
print("Failed ${result.error['status_message'] ?? result.error}");
}
// N/A
// N/A
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. |