Just Released! OTP Endpoint
We’re happy to let our users know that we have a new endpoint available in our API. This endpoint automates the creation of OTP and messages via our API. Now generating an OTP is as simple as making an API call. The endpoint takes the same parameters as our regular message endpoints.
The only modification is that you need to do is place the string “{otp}” in your message as a placeholder wherever you want the code to show up in your message. For instance using the following message:
“Thanks for registering. Your passcode for login is {otp}. Please use this code within 5 minutes”
would return the message
“Thanks for registering. Your passcode for login is 123456. Please use this code within 5 minutes”
If you don’t add the placeholder, no problem! We’ll insert it for you at the bottom of the message. For instance the message:
“Thanks for registering”
would return the message
“Thanks for registering. Your One Time Password is 123456”
Once you make the API call, the OTP code is returned as the “code” parameter in the response. Temporarily store this code in your system to verify your user is using the correct code.
Now SMS OTP couldn’t be easier! Give it a try today!
For more information, check out our API docs at https://semaphore.co/docs