Detach
Detaches an identity from the current profile.
Service | Operation |
---|---|
identity | DETACH |
Method Parameters
Parameter | Description |
---|---|
externalId | User ID |
authenticationType | Type of authentication. Full list of types can be found here. |
confirmAnonymous | If false will generate an error when downgrading to anonymous (null is false) |
Usage
http://localhost:3000
- C#
- C++
- Objective-C
- Java
- JavaScript
- Dart
- Cloud Code
- Raw
// Cloud Code only. To view example, switch to the Cloud Code tab
// Cloud Code only. To view example, switch to the Cloud Code tab
// Cloud Code only. To view example, switch to the Cloud Code tab
// Cloud Code only. To view example, switch to the Cloud Code tab
// Cloud Code only. To view example, switch to the Cloud Code tab
// Cloud Code only. To view example, switch to the Cloud Code tab
var externalId = "email@email.com";
var authenticationType = "Email";
var confirmAnonymous = false;
var identityProxy = bridge.getIdentityServiceProxy();
var postResult = identityProxy.detach(externalId, authenticationType, confirmAnonymous);
if (postResult.status == 200) {
// Success!
}
{
"service": "identity",
"operation": "DETACH",
"data": {
"externalId": "email@email.com",
"authenticationType": "Email",
"confirmAnonymous": false
}
}
JSON Response
{
"status" : 200,
"data" : null
}
Common Error Code
Status Codes
Code | Name | Description |
---|---|---|
40210 | DOWNGRADING_TO_ANONYMOUS_ERROR | Occurs when detaching the last non-anonymous identity from an account with continueAnon set to false. |