Get a Verification Code

Endpoint URL: {registrationDomain} /access/getVerificationCode


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.

This endpoint supports the following methods:

  • POST


POST

API Client Permissions

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

owner
access_issuer
direct_access
direct_read_access
login_client
Yes
No
Yes
No
No


Authentication

This endpoint supports both Basic authentication (recommended) and janrain-signed authentication.

How to Create an Authentication String


Base URL

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

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

Your Capture domains (also known as Registration domains) can be found in the 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
                                                

      Running this command in Postman


Query Parameters

ParameterTypeRequiredDescription
uuidstringNoUUID of the user account. This parameter is required unless you are using either the id parameter or the key_attribute parameter.
 
idstringNoID of the user account. This parameter is required unless you are using either the uuid parameter or the key_attribute parameter.
 
key_attributestringNoUnique attribute found in the user account schema. This parameter is required unless you are using either the id parameter or the uuid parameter.
 
key_valuestringNoValue assigned to the key_attribute parameter.
 
type_namestringYesName of the entityType where the user account is stored.
 
attribute_namestringYesName of the attribute to be updated when using the verification code.
 
lifetimestringNoNumber of seconds the verification code is valid for. The default lifetime is seven days (604800 seconds).
 


Responses

200 OK

Response Example (application/json)


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