Verify an email address

The /oauth/verify_email_native operation triggers the Registration system to send an email based on the configuration defined for the form used in the API call.

Email verification can also be initiated when a user registers (via /oauth/register_native_traditional.

1. Send verification email

$api_call= '/oauth/verify_email_native';
$params= array(
    'client_id'=> JANRAIN_LOGIN_CLIENT_ID,
    'flow'=> JANRAIN_FLOW_NAME,
    'flow_version'=> JANRAIN_FLOW_VERSION,
    'locale'=> 'en-US',
    // page where the user is sent
    'redirect_uri'=> EMAIL_VERIFICATION_URL,
    // the name of your resend-verification form as defined in the flow file
    'form'=> 'resendVerificationForm',
    // required field from resendVerificationForm
    'signInEmailAddress'=> $_POST['email']
$curl= curl_init();
$api_response= json_decode(curl_exec($curl));
ResponseOutcome / Next Step
Success (ok)Email verification email is sent to user.
No account found for provided email address (invalid_credentials)Provide a resolution path for this error.
Email address already verified (triggered_error)Provide a resolution path for this error.

2. Retrieve the verification code

A successful oauth/verify_email_native call will send the email to the user which contains the verify_email_url appended with a verification code. The landing page for this link must parse the verification code and consume it via the /access/useVerificationCode API call.

3. Consume the verification code

curl -X POST
// verification code parsed from verify_email_url
--data-urlencode `verification_code=12345678912345678912345678912345` \
ResponseOutcome / Next Step
Success (ok)The Registration server automatically sets the TimeStamp on the user’s emailVerified attribute.
Verification code not recognized (invalid_argument)Provide a resolution path for this error.