Multipurpose Token and SMS OTP Generation API
The Multipurpose Token and SMS OTP Generation API enables secure, versatile identity verification and user authentication workflows across multiple customer touchpoints.
This API suite supports generating email tokens, email OTPs, and SMS OTPs for critical use cases like:
- Account Verification
- Passwordless Login
- Account Recovery
- Add Email / Add Phone
- Forgot Password / Forgot PIN
- One-Touch Login
- Smart Login
Multipurpose Token and OTP API Endpoints
- Multipurpose Email Token Generation API
- Multipurpose SMS OTP Generation API
This API generates Email tokens and Email OTPs for a variety of scenarios:
Supported tokentype values
Value | Use Case |
---|---|
emailverification | Email Verification |
addemail | Add Email |
forgotpassword | Forgot Password |
deleteuser | Delete User |
passwordlesslogin | Passwordless Login |
forgotpin | Forgot PIN |
onetouchlogin | One-Touch Login |
autologin | Auto Login |
Here is an example of how to pass tokentype in the API:
curl --location 'https://api.loginradius.com/identity/v2/manage/account/emailtoken/{tokentype}?apikey=123&apisecret=123' \
--header 'Content-Type: application/json' \
--data-raw '{
"Email": "sample@example.com",
"Type": "string",
"Uid": "85efcb9963de47fb89d1b765cf08c5c2",
"ClientGuid": "8d59fca666204748b7fa22c977ce8e22"
}'
Sample Response
{
"Token": "c88c0e111b4343ca90918e487c6d50d4",
"ExpiresIn": "2025-10-01T22:25:48.076Z"
}
See the Multipurpose Email Token Generation API documentation.
This API generates SMS OTPs for mobile-based identity verification and login processes.
Value | Use Case |
---|---|
addphone | Add Phone |
phoneidverification | Phone ID Verification |
forgotpassword | Forgot Password |
forgotpin | Forgot PIN |
onetouchlogin | One-Touch Login |
smartlogin | Smart Login |
passwordlesslogin | Passwordless Login |
Here is an example of how to pass smsotptype in the API:
curl --location 'https://api.loginradius.com/identity/v2/manage/account/smsotp/{smsotptype}?apikey=123&apisecret=123' \
--header 'Content-Type: application/json' \
--data '{
"Phone": "919999999",
"Uid": "12344311234",
"Name": "string"
}'
Sample Response
{
"Token": "342519",
"ExpiresIn": "2025-09-25T01:19:19.737055707Z"
}
See the Multipurpose SMS OTP Generation API documentation.
Best Practices
- Select Appropriate Token Types: Use the correct tokentype or smsotptype based on your specific use case to ensure proper workflow behavior.
- Secure OTP/Token Delivery: Utilize secure and trusted SMS/email gateways to transmit OTPs and tokens.
- Token Expiry: Always define a sensible expiration time for OTPs and tokens to reduce risk.
- Never Share OTPs or Tokens: For your security, do not share any one-time passwords (OTPs) or login tokens with anyone, not even with someone claiming to be from support.
- Watch for Phishing Attempts: Be cautious of emails, SMS, or messages that ask you to enter OTPs or tokens on unfamiliar websites. Always double-check the URL or sender before taking action.
- Protect Secrets: Store API secrets in secure environment variables, not in client apps.
Related Resources
Multipurpose Email Token Generation Api