REST API
Learn how to integrate and use the EngageLab OTP REST API.
The EngageLab OTP service provides a set of RESTful APIs that allow you to programmatically create templates, send OTPs, and verify codes.
Follow these steps to get started with the REST API.
Create an API Key
Before calling any EngageLab OTP API, you need to generate an API Key to authenticate your requests.
- Log in to the EngageLab Console.
- Enter the OTP sub-console and select your application.
- Navigate to API Keys in the left navigation bar.
- Click Create API Key to generate a new
dev_keyanddev_secret.
⚠️ Warning
Yourdev_secretis highly sensitive. Please keep it safe and never expose it in client-side code or public repositories.
Authentication
The EngageLab OTP API uses HTTP Basic Authentication. You must include the Authorization header in all API requests.
This header is constructed by Base64 encoding your dev_key and dev_secret:
Authorization: Basic ${base64_auth_string}
${base64_auth_string} is generated by Base64 encoding your dev_key and dev_secret joined by a colon (:): base64(dev_key:dev_secret).
For more details, please refer to the Authentication guide.
Call the API
Once you have your API Key and understand the authentication mechanism, you can start calling the APIs. All API endpoints use the base URL https://otp.api.engagelab.cc.
Here are some of the main APIs you can integrate:
- Send OTP: Generate a verification code through the EngageLab platform and send it according to your template strategy.
- Verify OTP: Securely verify the one-time password (verification code) submitted by the user.
- Custom Send OTP: If you prefer to generate the verification code yourself, you can send the pre-generated code to the user.
- Custom Send Message: Send message content (such as notifications or marketing messages) based on a custom template.
- Template Management: Programmatically create, delete, get the list of all templates, and view template details.
- Callback Configuration: Configure callback addresses and use secure verification mechanisms to receive status reports and notifications.
- Lifecycle Status Callback: Receive real-time data on message lifecycle states such as sending, delivery, and verification via callbacks.
- SMPP: Achieve efficient and reliable message delivery and status reporting via TCP connections using the SMPP protocol.










