AttachNintendoIdentity
Attach the user's Nintendo credentials to the current profile.
Service | Operation |
---|---|
identity | ATTACH |
Method Parameters
Parameter | Description |
---|---|
nintendoAccountId | The Nintendo Network Services Account (NSA) ID for the user |
nintendoAuthToken | An NSA ID token retrieved via the NintendoSDK |
Usage
http://localhost:3000
- C#
- C++
- Objective-C
- Java
- JavaScript
- Dart
- Cloud Code
- Raw
string nintendoAccountId = "nsaid"; // Network Services Account ID
string nintendoAuthToken = "nsaToken";
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.AttachNintendoIdentity(
nintendoAccountId, nintendoAuthToken, successCallback, failureCallback);
const char* nintendoAccountId = "nsaid"; // Network Services Account ID
const char* nintendoAuthToken = "nsaToken";
_bc->getIdentityService()->attachNintendoIdentity(
nintendoAccountId,
nintendoAuthToken,
this);
// N/A
// N/A
// N/A
// N/A
// 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 Email 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 Email account). |