Kaleyra Cloud API Documentation

Getting Started

Data is considered the most valuable asset in any business, and safeguarding them from hackers and breaches is a mighty task. Sometimes, you might come across many fraudulent users, and it is tough to identify them. What you need is an advanced security system to protect your business-critical data and to avoid high costs.

Kaleyra’s Verify automates the generation and verification of OTPs send to the end-user for your business. You can authenticate users during sign up or any transaction process by sending OTP and confirming their ownership of the account or phone number. Furthermore, you can create the OTP generation flow as per your needs and even regulate the permission for only specific IP addresses to accept responses.


Kaleyra Verify provides simple APIs to

  • Generate and send OTPs to customers over SMS, Voice and Email
  • Validate the OTP being entered by the customer.

Go through our Verify page for more information on the functions and benefits of the Verify module.

How does this work?

During the signup process of your application, you need to configure the below to authenticate your users

Access Verify in KCloud

You can access the Verify page in just two clicks. All you need to do is, log in to your KCloud account and click Verify from the left navigation bar.

On the Verify page, you have,

  • Dashboard: You will see the complete insight of the generated OTPs here. Information such as the list of logs and status of the OTPs are displayed.
  • Flows: Configure the verification flow from this tab. You can also see the list of created flows and their information.
  • Templates: This is where you create the new templates and send them for approval. You can also check the status (Pending, Approved, or Rejected) of your templates in this tab.
  • Analytics: You can see the entire logs and download the reports of the OTPs generated from this tab.

Creating a template

To create a template,

  1. Sign in to your KCloud account.
  2. Click Verify displayed on the left navigation bar.
    The Dashboard tab is displayed.
  3. Click Templates and click Add Template.
    The Add New Template window is displayed.
  4. Enter the template name in the Template title text box.
  5. Select either of the following from the Select Channel drop-down menu.
    a. SMS: Select this option if you want to create an SMS template.
    b. Email: Select this option if you want to create an Email template.
  6. Enter the template content and click Save.

Your new template is now sent for approval. Our support team will review the template and approve if the template is appropriate. The status of the template will be changed accordingly on the K-Cloud Template listing screen.

Configuring a verification flow

Once the template is approved, you can then configure a verification flow.

To configure a verification flow,

  1. Sign in to the Kaleyra Cloud account.
  2. Click Verify displayed on the left navigation bar.
  1. Click Flows and click Configure Verification Flow to create a new flow.
  2. Provide the following details:
    a. Flow name: Name of the flow you want to configure.
    b. Expiry time in seconds: Define the expiration time of the OTP here. The OTP expires
    beyond this time, and the user has to request a new one.
    c. Flow description: Explain briefly about this flow. This function is useful when you have
    multiple flows.
    d. OTP Length: Set the OTP length here.
    e. Do you want to make it default?: Select this option to set this flow as default.

Now, you need to select the order of the channels through which you want to send the OTP.

  1. Under Channel 1, select SMS or Email from the Select channel drop-down menu and provide the following details:
    For SMS,
    a. Sender ID: Select the required sender ID from the drop-down menu.
    b. SMS Template: Select the SMS template from the list.
    For Email,
    a. Email: Enter the email address from which you want to send the OTP.
    b. Email Template: Select the email template from the list.
  2. Click Add new channel to add the second channel.
  3. Under Channel 2, select the second channel from the drop-down menu.
  4. To define the settings of the channel 2 OTP flow, select either of the following options:
    a. Send anyway: This will send the OTP through both the channels simultaneously.
    b. Send after time interval: Select this option and define the time interval. If the user fails to
    validate the OTP received from the first channel within this TAT, then the API will trigger the
    same OTP through the second channel.
  1. Review the details and click Save.
    Verification flow is configured successfully, and you can see the same under the Flows tab.

Flow ID
KCloud will generate a unique ID called Flow ID for every configured flow. This ID will act as a reference and execute the flow as per the settings when you pass through the generate OTP API.

Generating OTP

Now that you have configured the verification flow, you should execute the Generate OTP API command with the Flow ID to generate and send the OTP.

Validating OTP

You can verify the status of the OTP through either Validate OTP API or the KCloud console. The Dashboard tab in the Verify page displays the real-time data of the number of OTPs sent, delivered, and verified by the users.

Updated 10 days ago

Getting Started

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.