Get a verification code

Returns a verification code that can later be used with the /access/useVerificationCode endpoint. Verification codes are used to perform such tasks as resetting a password or verifying an email address.

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 domain (also known as a Registration domain) can be found in Console on the Manage Application page.

Examples

Example request

This command requests an email verified verification code for the user with the user ID 11521.

curl -X POST \
  -H "Authorization: Basic dXQ0YmdycmE3dzI4MmpjZm15cGZxeDlwemhxaGpqMmI6dW5qemU5bndrZnV5NmpwdzgzOHFwYTdhZDNoZG55YTY=" \
  --data-urlencode id=11521 \
  --data-urlencode type_name=user \
  --data-urlencode attribute_name=emailVerified \
  https://my-app.janraincapture.com/access/getVerificationCode

Parameters

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

uuidstringUUID of the user account. This parameter is required unless you are using either the id parameter or the key_attribute parameter to identify the user.
idstringID of the user account. This parameter is required unless you are using either the uuid parameter or the key_attribute parameter to identify the user.
key_attributestringUnique attribute found in the user account schema. This parameter is required unless you are 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 set to email then key_value needs to be set to the user's email address.

This value is required if you're using the key_attribute parameter.
type_namestringName of the entity type where the user account is stored.
attribute_namestringName of the attribute to be updated when using the verification code.
lifetimeintegerNumber of seconds that the verification code is valid. The default lifetime is seven days (604800 seconds).

Responses

200 OK

Response example (application/json)

If your API call succeeds the response includes a verification code.

{
  "verification_code": "htjwg2uphwz5mqxrnqe4tuvpxkzaqrr5",
  "stat": "ok"
}