AttachParseIdentity
Attach the user's Parse credentials to the current profile.
Service | Operation |
---|---|
identity | ATTACH |
Method Parameters
Parameter | Description |
---|---|
parseId | The parse ID of the user |
authenticationToken | The validated token from Parse (that will be further validated when sent to the brainCloud service) |
Usage
http://localhost:3000
- C#
- C++
- Objective-C
- Java
- JavaScript
- Dart
- Cloud Code
- Raw
string parseId = "someId";
string token = "someToken";
_bc.IdentityService.AttachParseIdentity(
parseId,
token,
SuccessCallback, FailureCallback);
const char * parseId = "someId";
const char * token = "someToken";
_bc->getIdentityService()->attachParseIdentity(
parseId, token, this);
- (void)attachParseIdentity:(NSString *)parseId
authenticationToken:(NSString *)token
completionBlock:(BCCompletionBlock)cb
errorCompletionBlock:(BCErrorCompletionBlock)ecb
cbObject:(BCCallbackObject)cbObject;
public void attachParseIdentity(String parseId, String authenticationToken, IServerCallback callback)
_bc.identity.attachParseIdentity = function(parseId, authenticationToken, callback)
var parseId = "someId";
var authenticationToken = "someToken";
ServerResponse result = await _bc.identityService.attachParseIdentity(parseId:parseId, authenticationToken:authenticationToken);
if (result.statusCode == 200) {
print("Success");
} else {
print("Failed ${result.error['status_message'] ?? result.error}");
}
// N/A
// N/A
JSON Response
{
"status": 200,
"data": null
}
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 Parse identity for a profile. |
40212 | MERGE_PROFILES | Returned when trying to attach an identity type that would result in two profiles being merged into one (for instance an anonymous account and a Parse account). |