Msg91
OTP Widget

OTP Widget

These APIs enable the integration of OTP-based authentication (via Msg91โ€™s Widget) for both mobile numbers and email addresses. They support sending, retrying, and verifying OTPs, as well as validating access tokens.

๐Ÿ“Œ Notes

  • All endpoints use the POST method.

  • widgetId refers to the unique Widget ID configured in your Msg91 dashboard.

  • Always securely store the Authkey and access-token.

  • reqId is required for retrying and verifying OTPs; it is returned in the response of the Send OTP API.

  • The retryChannel is optional if only one retry method is configured in the widget.

๐Ÿงช Example Flow

  1. Send OTP โ†’ Get reqId

  2. Retry OTP (optional) โ†’ Use reqId

  3. Verify OTP โ†’ Get JWT access-token

  4. Verify access-token โ†’ Get verified user information

Note: Captcha validations and invisible OTP are not supported.