Get an access token

__MAGIC_BLOCK_0__
Returns an access token for the specified user.

API client permissions

The following table indicates the API clients that can and can't be used to call this operation:

owneraccess_issuerdirect_accessdirect_read_accesslogin_client

Authentication

This operation supports both Basic authentication (recommended) and janrain-signed authentication. See Get started for more information.

Base URL

The base URL for this operation is your Identity Cloud Capture domain; for example:

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

Your Capture domains(also known as a Registration domain) can be found in Console on the Manage Application page.

Examples

Example request

This command returns an access token for the user with the UUID 02b0c68d-7d7a-49d8-a88d-022585b0f877.

curl -X POST \
  -H "Authorization: Basic dXQ0YmdycmE3dzI4MmpjZm15cGZxeDlwemhxaGpqMmI6dW5qemU5bndrZnV5NmpwdzgzOHFwYTdhZDNoZG55YTY="\
  --data-urlencode uuid=02b0c68d-7d7a-49d8-a88d-022585b0f877 \
  --data-urlencode type_name=user \
  https://my-app.janraincapture.com/access/getAccessToken

Parameters

All parameters need to be configured as x-www-form-urlencoded body parameters.

ParameterTypeRequiredDescription
uuidstringUUID of the user account. This parameter is required if you are not using either the id parameter or the key_attribute parameter to identify the user.
idstringID of the user account. This parameter is required if you are not using either the uuid parameter or the key_attribute parameter to identify the user.
key_attributestringName of a unique attribute found in the user profile schema. This parameter is required if you are not using either the id parameter or the uuid parameter to identify the user.
key_valuestringValue assigned to the key_attribute parameter. For example, if key_attribute is email then key_value needs to be set to the user's email address.

Required if using key_attribute to identify the user.
type_namestringName of the entity type where the user account is stored.
for_client_idClient ID of the client retrieving the access token.

Responses

200 OK

Response Example (application/json)

If your API call succeeds you'll get back an access token.

{
  "accessToken": "tc7blahblah3tmaz",
  "stat": "ok"
}