RefreshIdentity
Refreshes an identity for this player
Service | Operation |
---|---|
identity | REFRESH_IDENTITY |
Method Parameters
Parameter | Description |
---|---|
externalId | User ID |
authenticationToken | Password or client side token |
authenticationType | Type of authentication |
Usage
http://localhost:3000
- C#
- C++
- Objective-C
- Java
- JavaScript
- Dart
- Cloud Code
- Raw
string externalId = "846557642688";
string authenticationToken = "ghbiuhgvbiuhbiunbuibgin";
string authenticationType = "Facebook";
SuccessCallback successCallback = (response, cbObject) =>
{
Debug.Log(string.Format("Success | {0}", response));
};
FailureCallback failureCallback = (status, code, error, cbObject) =>
{
Debug.Log(string.Format("Failed | {0} {1} {2}", status, code, error));
};
_bc.IdentityService.RefreshIdentity(externalId, authenticationToken, authenticationType, successCallback, failureCallback);
const char *externalId = "846557642688";
const char *authenticationToken = "ghbiuhgvbiuhbiunbuibgin";
const char *authenticationType = "Facebook";
_bc->getIdentityService()->refreshIdentity(externalId, authenticationToken, authenticationType, this);
NSString *externalId = @"846557642688";
NSString *authenticationToken = @"ghbiuhgvbiuhbiunbuibgin";
NSString *authenticationType = @"Facebook";
BCCompletionBlock successBlock; // define callback
BCErrorCompletionBlock failureBlock; // define callback
[[_bc identityService] refreshIdentity:externalId
authenticationToken:authenticationToken
authenticationType:authenticationType
completionBlock:successBlock
errorCompletionBlock:failureBlock
cbObject:nil];
String externalId = "846557642688";
String authenticationToken = "ghbiuhgvbiuhbiunbuibgin";
String authenticationType = "Facebook";
this; // implements IServerCallback
_bc.getIdentityService().refreshIdentity(externalId, authenticationToken, authenticationType, 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 = "846557642688";
var authenticationToken = "ghbiuhgvbiuhbiunbuibgin";
var authenticationType = "Facebook";
_bc.identity.refreshIdentity(externalId, authenticationToken, authenticationType, result =>
{
var status = result.status;
console.log(status + " : " + JSON.stringify(result, null, 2));
});
var externalId = "846557642688";
var authenticationToken = "ghbiuhgvbiuhbiunbuibgin";
var authenticationType = AuthenticationType.facebook;
ServerResponse result = await _bc.identityService.refreshIdentity(externalId:externalId, authenticationToken:authenticationToken, authenticationType:authenticationType);
if (result.statusCode == 200) {
print("Success");
} else {
print("Failed ${result.error['status_message'] ?? result.error}");
}
var externalId = "846557642688";
var authenticationToken = "ghbiuhgvbiuhbiunbuibgin";
var authenticationType = "Facebook";
var identityProxy = bridge.getIdentityServiceProxy();
var postResult = identityProxy.refreshIdentity(externalId, authenticationToken, authenticationType);
if (postResult.status == 200) {
// Success!
}
{
"service": "identity",
"operation": "REFRESH_IDENTITY",
"data": {
"externalId": "846557642688",
"authenticationToken": "ghbiuhgvbiuhbiunbuibgin",
"authenticationType": "Facebook"
}
}
JSON Response
{
"status": 200,
"data": {
"externalId": "758945465505",
"authenticationType": "Facebook"
}
}