Skip to main content

Integration Guide: Auth0

Send automated OTPs and secure SMS notifications directly from your Auth0 app using ClickSend.

Updated over 3 weeks ago

What’s Included

When you integrate ClickSend with Auth0, you’ll get:

  • OTP Verification – Send one-time passwords for login or signup

  • SMS Notifications – Send real-time notifications for multi-factor authentication (MFA)


Prerequisites

  • A ClickSend account

  • An Auth0 account

  • Your ClickSend API credentials (username + API key)


Installation

  1. Set up ClickSend in Auth0:

    • Log in to your Auth0 Dashboard.

    • Go to the Marketplace and click Add Integration.

    • Choose your tenant and grant the necessary permissions.

    • You'll be redirected to the Library where you'll need to enter your ClickSend API credentials (username and API key).

    • API Key can be found in your ClickSend dashboard: ClickSend API Key.

    • Click Create to save the connection.

  2. Configure OTP Settings in Auth0:

    • Go to Dashboard > Security > Multi-factor Authentication.

    • Enable One-Time Password (OTP).

    • Scroll to Define Policies and set Require multi-factor authentication to Always, then click Save.

  3. Configure Phone Message for SMS:

    • In Security, configure the Phone Message Factor for SMS delivery.

    • Enable Phone Message and save your changes.

  4. Add the ClickSend Action to the Flow:

    • Click Add to Flow in the pop-up window that appears.

    • Drag the ClickSend Action to the desired location in your MFA flow.


Authentication

To activate the SMS component:

  1. In the component settings of Auth0, go to API Credentials.

  2. Enter your:

    • Username – Your ClickSend username

    • API Key – The key found in your ClickSend dashboard


OTP Verification (One-Time Passwords)

Verify users during login or signup using one-time passwords (OTP).

Configuration

  1. Go to the Verification Menu > Message Body.

  2. Include %otp% where you want the OTP to appear in your message.

  3. Example: Your verification code is %otp%.

  4. Tip: Use Magic Text to automatically pull saved phone numbers from the user database.

  5. Customise: Adjust the “Get OTP” button text, appearance, and flow to suit your needs.


SMS Notification

Send SMS alerts for multi-factor authentication or other in-app triggers (e.g., user login attempts).

Configuration

  1. In Phone Message Factor, add a static or dynamic message in the Message Body field.

  2. Optionally, set a confirmation message after the SMS is sent, such as “SMS Sent”.

  3. Allow users to edit the message in real-time before sending.


Troubleshooting

If messages fail to send, try the following:

  • Verify API Credentials:

    • Confirm that you have entered the correct ClickSend username and API key (not your password).

  • Ensure Sufficient Credit:

    • Check if your ClickSend account has enough credit. Top up your account here.

  • Fill Required Fields:

    • Ensure all required fields (e.g., to phone number, message body) are filled correctly.


Alpha Tag Issues:

If using a business name (Alpha Tag) as the sender:

  • Ensure it is max 11 characters with no spaces.

  • Some countries do not support Alpha Tags. Check the supported list here.

  • Ensure the Alpha Tag is registered and approved in the ClickSend dashboard.


FAQs

Can I use my business name as a sender?

Yes, but only in countries that support Alpha Tags. Ensure the Alpha Tag is:

  • 11 characters or fewer

  • No spaces

  • Registered and approved via your Sender IDs page in ClickSend

How do I set up an Alpha Tag?

Go to API Credentials in the ClickSend Dashboard and enable the Change Alpha Tag/Sender ID option.

Did this answer your question?