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:
| owner | access_issuer | direct_access | direct_read_access | login_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.
| Parameter | Type | Required | Description |
|---|---|---|---|
| uuid | string | ✗ | UUID 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. |
| id | string | ✗ | ID 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_attribute | string | ✗ | Name 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_value | string | ✗ | Value 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_name | string | ✓ | Name of the entity type where the user account is stored. |
| for_client_id | ✗ | Client 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"
}
Updated almost 3 years ago
