AttachOculusIdentity
Attach the user's Oculus credentials to the current profile.
Service | Operation |
---|---|
identity | ATTACH |
Method Parameters
Parameter | Description |
---|---|
userId | The Oculus id of the user |
nonce | The returned nonce from the Oculus Platform SDK |
Usage
http://localhost:3000
- C#
- C++
- Objective-C
- Java
- JavaScript
- Dart
- Cloud Code
- Raw
string userId = "userId";
string nonce = "nonce";
_bc.IdentityService.AttachOculusIdentity(
userId,
nonce,
SuccessCallback, FailureCallback);
const char * userId = "userId";
const char * nonce = "nonce";
_bc->getIdentityService()->attachOculusIdentity(
userId, nonce, this);
// N/A
String userId = "userId";
String nonce = "nonce";
this; // implements IServerCallback
_bc.getIdentityService().attachOculusIdentity(userId, nonce, 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()));
}
// 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 Oculus 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 Oculus account). |