UpdateUniversalIdLogin
Updates the UniversalId of the current profile. Note - works for non-login versions of UniversalId as well.
Call will fail if the new UniversalId is already in use, or if the profile does not have a UniversalId.
| Service | Operation |
|---|---|
| identity | UPDATE_UNIVERSAL_LOGIN |
Method Parameters
| Parameter | Description |
|---|---|
| externalId | The new universal id to update to |
Usage
http://localhost:3000
- C#
- C++
- Objective-C
- Java
- JavaScript
- Dart
- Cloud Code
- Raw
string externalId = "username";
_bc.IdentityService.UpdateUniversalIdLogin(
externalId,
SuccessCallback, FailureCallback);
const char * externalId = "username";
const char * token = "someToken";
_bc->getIdentityService()->updateUniversalIdLogin(
externalId, this);
NSString *externalId = @"username";
BCCompletionBlock successBlock; // define callback
BCErrorCompletionBlock failureBlock; // define callback
[[_bc identityService] updateUniversalIdLogin:externalId
completionBlock:successBlock
errorCompletionBlock:failureBlock
cbObject:nil];
String externalId = "username";
this; // implements IServerCallback
_bc.identity.updateUniversalIdLogin(externalId, this);
public void serverCallback(ServiceName serviceName, ServiceOperation serviceOperation, JSONObject jsonData)
{
System.out.print(String.format("Success | %s", jsonData.toString()));
}
public void serverError(ServiceName serviceName, ServiceOperation serviceOperation, int statusCode, int reasonCode, String jsonError)
{
System.out.print(String.format("Failed | %d %d %s", statusCode, reasonCode, jsonError.toString()));
}
var externalId = "username";
_bc.identity.updateUniversalIdLogin(externalId, result =>
{
var status = result.status;
console.log(status + " : " + JSON.stringify(result, null, 2));
});
var externalId = "username";
ServerResponse result = await _bc.identityService.updateUniversalIdLogin(externalId:externalId);
if (result.statusCode == 200) {
print("Success");
} else {
print("Failed ${result.error['status_message'] ?? result.error}");
}
var externalId = "username";
var identityProxy = bridge.getIdentityServiceProxy();
var postResult = identityProxy.updateUniversalIdLogin(externalId);
if (postResult.status == 200) {
// Success!
}
{
"service": "identity",
"operation": "UPDATE_UNIVERSAL_LOGIN",
"data": {
"externalId": "username"
}
}
JSON Response
{
"status" : 200,
"data" : null
}