Account Activation

On this page, we dive into Account Activation Emails and how you can use them to confirm the emails of your users.

Why is Account Activation important?

Account Activation is important because it allows you to confirm that the email address of a user is valid. This is important because it allows you to prevent users from signing up with fake email addresses.

How does Account Activation work?

Account Activation works by sending an email to a user with a link that they must click to confirm their email address. Once the user clicks the link, you can verify that the email address is valid.

You verify an Activation Link by sending a POST request to https://api.devrift.co.

Below is a list of parameters that you'll need:

  • at parameter must be set to activation_create.
  • em parameter must be set to the email address of the user.

Example Request

curl -X POST https://api.devrift.co/v1 \
  -H "Authorization: Bearer {sk_test_foobar...}" \
  -d "at=activation_create, em=YOUR_USERS_EMAIL"

Below we show you how to do this using our PHP SDK.

// Import the DevRIFT SDK
use DevRift\DevRift;

// Import the Activation Request class
use DevRift\Activation\Request;

// snip...

// Set your Secret Key
DevRIFT::setApiKey("sk_test_foobar...");

// Create an Activation Link with YOUR_USERS_EMAIL
Activation::request(YOUR_USERS_EMAIL);

You verify an Activation Link by sending a POST request to https://api.devrift.co.

Below is a list of parameters that you'll need:

  • at parameter must be set to activation_verify.
  • vl parameter must be set to the vl parameter from the Activation Link.
  • sr parameter must be set to the sr parameter from the Activation Link.

Below we show you how to do this using our PHP SDK.

// Import the DevRIFT SDK
use DevRift\DevRift;

// Import the Activation Verify class
use DevRift\Activation\Verify;

// snip...

// Set your Secret Key
DevRIFT::setApiKey("sk_test_foobar...");

// Verifies the Activation Link and returns the email address
$email = Activation::verify();