Skip to content

Confirm Email or Mobile

Request URL

GET /confirm/email/:AFiUserId/:confirmationCodeEmail

Description

This API is used to confirm a prospect's mobile number or email address. The confirmation code (confirmationCodeMobile or confirmationCodeEmail), which the prospect receives in a text message or email, is given as a path parameter along with the user id (AFiUserId).

HTML is returned that will generate a confirmation page with the message, "Email/Mobile confirmed. Thank you" and a link to the PayGears website.

For mobile phone confirmation, use the equivalent URL, /confirm/mobile/:AFiUserId/:confirmationCodeMobile.

Snippet Examples

javascript

const axios = require('axios');
const config = {
  method: 'GET',
  url: '${AMPLIFI_BASE_URL}/confirm/email/:AFiUserId/:confirmationCodeEmail',
  headers: {
    'token': "A long random string token received from /token request"
  },
};

let result;
try {
  result = await axios.request(config);
  if (result.status === 200) {
    console.log(JSON.stringify(result.data));
  }
} catch (err) {
  console.log({
    errCode: err.code,
    responseStatus: err.response && err.response.status,
    data: err.response && JSON.stringify(err.response.data)
  });
}

cURL

curl --location "AMPLIFI_BASE_URL/confirm/email/:AFiUserId/:confirmationCodeEmail"  --header "token: A long random string token received from /token request" 

Successful Response Examples

200 CONFIRM/EMAIL/:AFIUSERID/:CONFIRMATIONCODEEMAIL SUCCESSFUL RESPONSE CONFIRMING EMAIL ADDRESS

HEADERS

Header Value
token A long random string token received from /token request

PARAMETERS

Parameter Description Value
AFiUserId [required] qweaurl8kgtlv9pc
confirmationCodeEmail [required] bztuqsahxc

REQUEST BODY

none

RESPONSE BODY

  <h2>Email confirmed</h2>
  Thank you.