Send OTP through ChatDaddy API
Follow these steps to send OTPs to your clients through ChatDaddy: Video 1. Log in to ChatDaddy and navigate to Automation > Message Flows. 1. Create a new message flow by clicking…
Follow these steps to send OTPs to your clients through ChatDaddy:
Step 1: Create a Message Flow
-
Log in to ChatDaddy and navigate to Automation > Message Flows.
-
Create a new message flow by clicking the "+" button on the left sidebar.
-
In the message flow editor, create a template with the message you want to send to your customer. Ensure you use the variable
{{verificationCode}}.
Ex:
Hello {{name}} ! Here is your OTP: {{verificationCode}}
- Submit your flow for approval to WhatsApp. Once approved, you will be able to use this template to message your customers
❗ Note: Make sure to include the {{verificationCode}} variable as this will be replaced by your OTP when you send the message
Step 2: Submit the Template for Approval
-
Once your message flow is created, you need to submit the template for approval to WhatsApp.
-
Navigate to the three dot menu on the top right of your message flow and select "Submit for Approval"
-
Select your WABA Channel and the message you want to send for approval. Also input the language of your message and select "Authentication" in Category
❗ Note: You will not be able to send your message to your clients without submitting it for approval. The WhatsApp team may take up to 24 hours to approve your message
Step 3: Generate an API Token
-
Navigate to the Developer section in ChatDaddy and select API Token.
-
Click on the "+Create" button to create a new API token.
-
Give your API token a name, for example, "OTP Token".
-
Assign the necessary scope to it and click Save:
-
Access to Messages to All:
MESSAGES_SEND_TO_ALL -
Copy the generated API Token
Step 4: Use the API Token to Send OTPs
-
With your API token ready, you can now use it to send OTPs programmatically.
-
Use the
bots/{id}/fireAPI endpoint to send the message flow you created earlier. Refer to the API Documentation for more details.