/oauth/unlink_account_native

This endpoint is used to unlink a social provider from a user account. Once unlinked, the social provider cannot be used to sign into that account. To make this call, you must have a valid Registration access token for the user record to be updated.

Note. This must be a POST request with all parameters included in the body of the request; they cannot be passed as URL parameters.

This endpoint includes the following methods:

  • POST

POST

Base URL

The base URL for this endpoint is your Janrain Capture domain; for example:

https://educationcenter.us-dev.janraincapture.com

Your Capture domains (also known as Registration domains) can be found in the Janrain Console on the Manage Application page:

Examples

Example: Unlink a Social Provider


  curl -X POST \
    --data-urlencode 'client_id=12345abcde12345abcde12345abcde12'\
    --data-urlencode 'flow=standard'\
    --data-urlencode 'flow_version=67890def-6789-defg-6789-67890defgh67'\
    --data-urlencode 'locale=en-US'\
    --data-urlencode 'access_token=z0y98xv76u5t4rs3'\
    --data-urlencode 'identifier_to_remove=http://www.example.com/profile/1234567890'\
    'https://my-app.janraincapture.com/oauth/unlink_account_native'
                                                            

Running Code Samples Using Postman

The Janrain REST API code samples are written using Curl, but they can easily be run from within Postman. To use one of our code samples in Postman:

  1. Click the Copy to Clipboard button located directly beneath the code sample
  2. In Postman, click Import to display the Import dialog box.
  3. In the Import dialog box, click Paste Raw Text, and then paste in the copied code. The Import dialog box should look similar to this:

  4. Click Import, and the Curl command will be converted to a format that can be run from within Postman. All you need to do now is configure the command to work with your Janrain implementation.

Authorized Clients

login_client

Security

  •  none-required

Query Parameters

Parameter Type Required Description
access_token string Yes Registration access token returned after authentication or registration with a previous call (/oauth/auth_native/oauth/auth_native_traditional, and so on). If this parameter is set to code, you will need to exchange the authorization code for an access token using the /oauth/token call.
 
client_id string Yes API client ID used to authenticate the call. This client must be configured with the login_client feature, which gives it permission to use login and registration-based API endpoints. API client permissions may be configured by using the clients/set_features endpoint.
 
flow string Yes Name of the flow configured with the login experience you want to use. This parameter corresponds to the janrain.settings.capture.flowName JavaScript setting used in widget- based implementations. The default flow provisioned with Registration applications is named the standard flow; if you have multiple flows, you can find a list of valid flow names using the Configuration API. You may cb this parameter if you configure the flow name in the default_flow_name setting for the API client used to make this call.
 
flow_version string Yes Version number of the flow set in the flow parameter. This parameter corresponds to the janrain.settings.capture.flowVersion JavaScript setting used in widget-based implementations; however, this call will not accept a version of HEAD. Instead, you must specify the version number if you want to use the most recent version. You can find a list of versions for your flow using the Configuration API. This parameter can be omitted if you you configure the flow version in the default_flow_version setting for the API client used to make this call.
 
identifier_to_remove string Yes Identifier URL for the social account you want to unlink. You can find available social identifier URLs for a user record by making an /entity API call filtering forprofiles.identifier.
 
locale string Yes Code for the language you want to use for the profile management experience. This parameter determines the language for any error messages returned to you and corresponds to the janrain.settings.language JavaScript setting used in widget-based implementations. The default locale provisioned with the standard Registration flow is en-US. Other locales must be configured in your flow. You can find a list of valid locales for your flow using the Configuration API.
 

Responses

200 OK

Successful Response

A successful call will return the simple response below:


{
  "stat": "ok"
}
                                                            

Error - Invalid Registration Access Token

The example error response below indicates that the Registration access token passed into the call is invalid or expired.


{
    "stat": "error",
    "code": 413,
    "error_description": "invalid access token",
    "error": "invalid_access_token",
    "request_id": "9xmecweny6bxt5n2"
}
                                                            

Error - Missing Required Parameters

The example error response below indicates that one of the required parameters for the call was not included. The error message will describe which parameter is missing.


{
  "stat": "error",
  "code": 100,
  "error_description": "missing arguments: flow",
  "error": "missing_argument",
  "request_id": "uyeem84bmqmnjuu4"
}
                                                            

Error - Invalid Flow Value

The example error response below indicates that the value provided for one or more of the flow, flow_version, or locale parameters is invalid. Flow versions are unique across environments, so check that the version value included in the call is for the correct environment (that is, your development or production application).


{
  "stat": "error",
  "code": 500,
  "error_description": "could not find a flow named 'standard' with version '12345abc-1234-abcd-1234-12345abcde12' and locale 'en-US'",
  "error": "unexpected_error",
  "request_id": "murynd7fhpysq6um"
}
                                                            

Error - Invalid API Client Permissions

The example error response below indicates that the API client used to make the call is not configured with the login_client feature.


{
  "stat": "error",
  "code": 403,
  "error_description": "This client does not support log in and registration.",
  "error": "permission_error",
  "request_id": "y3sthb9dey6mv65e"
}