Skip to main content
Version: 5.7.0

AttachPeerProfile

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

ServiceOperation
identityATTACH_PEER_PROFILE

Method Parameters

ParameterDescription
peerIdentifies peer app
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 peer = "test";
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.AttachPeerProfile(externalId, authenticationToken, authenticationType, externalAuthName, peer, forceCreate, successCallback, failureCallback);
JSON Response
{
"status": 200,
"data": {
"profileId": "1234-1234-1234-1234",
"newUser": false
}
}