Skip to main content
Version: 5.7.0

AttachParentWithIdentity

Attach a parent identity to the current profile. Create if necessary.

ServiceOperation
identityATTACH_PARENT_WITH_IDENTITY

Method Parameters

ParameterDescription
externalIdUser ID
authenticationTokenPassword or client side token
authenticationTypeType of authentication. Full list of types can be found here.
externalAuthNameThe name of the external authentication mechanism (optional, used for custom authentication types)
forceCreateWhether to create the profile if it does not exist

Usage

http://localhost:3000
string externalId = "email@email.com";
string authenticationToken = "email@email.com";
AuthenticationType authenticationType = AuthenticationType.Email;
string externalAuthName = "";
bool forceCreate = true;
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.AttachParentWithIdentity(externalId, authenticationToken, authenticationType, externalAuthName, forceCreate, successCallback, failureCallback);
JSON Response
{
"status": 200,
"data": {
"profileId": "1234-1234-1234-1234",
"newUser": false
}
}