Send & Confirm OTP using Sendchamp Verify API

This guide will walk you through how to send Send and confirm OTP using sendchamp Verification API

Aliyu Abubakar

Aug 10, 2021

In this tutorial, you’ll learn how to send verification to your customers using Sendchamp Verification API. The verification API allows you to verify customers via phone, email and WhatsApp.

First thing's first, make sure you have signed up for your free sendchamp Account.

image

Once you have signed up for a free account, you’ll then need to do the following;

  1. Obtain your API keys
  2. Install a library or use your preferred language
  3. Verification API Call
  4. Send Verification
  5. Confirm Verification

Obtain your API keys

Sendchamp authenticates your API requests using your account’s API Key. If you do not include your key when making an API request, or use one that is incorrect or outdated, your request will return an error.

image

We included a test API KEY in our code samples. Make sure you replace our API test key with your own live or test API Key depending on what you intend to do, whether you want to test the API or send live messages.

Obtain your API key so sendchamp can authenticate your integration’s API requests. You can obtain your API key by simply visiting your dashboard, click on account settings, APIs & webhooks and there you’ll find your Access key.

If you cannot see your API keys on your dashboard, this means you do not have access to them. Only sendchamp users can access API Keys.

Install a library

You'll need to ensure that you have the library you wish to use installed on your computer. If you haven’t installed any library, follow the official installation instructions for your operating system to install it.

Sending Verification API Call

When sending Verification, API call must have the following components:

An Authorization header. An API Key must be included in the Authorization header.

A request. When submitting data to a resource via POST or PUT, you must submit your payload in JSON.

Confirming Verification API Call

When confirming Verification, API call must have the following components:

An Authorization header. An API Key must be included in the Authorization header.

A request. When submitting data to a resource via POST or PUT, you must submit your payload in JSON.

Send Verification

Depending on the language you wish to use, using one of our verification code samples here, write a script that will submit a message request.

  • Copy the sample example for your preferred language.
  • Paste the sample example into your favorite text editor.
  • Copy your API key and paste it in the "Authorization" header.
  • In the data section, specify the "channel", "sender", “token_length”, “token_type” “expiration_time".

Confirm Verification

Depending on the language you wish to use, using one of our verification code samples here, write a script that will submit a message request.

  • Copy the sample example for your preferred language.
  • Paste the sample example into your favorite text editor.
  • Copy your API key and paste it in the "Authorization" header.
  • In the data section, specify the "verification_reference" and "verification_otp".

© 2021 Sendchamp. All rights reserved.