Authyo Docs
  1. APIs
Authyo Docs
  • 🐶 Walk through Authyo
  • Error Codes
  • About Pricing
  • APIs
    • Send OTP
      GET
    • Send OTP
      POST
    • Verify OTP
      GET
    • Verify Token
      POST
  • Web SDKs
    • JavaScript
    • PHP
    • AngularJS Examples
    • TypeScript Examples
    • React JS
    • Vue JS Examples
  • Native/Mobile SDKs
    • Flutter
  1. APIs

Send OTP

POST
https://app.authyo.io/api/v1/auth/sendotp
This is a POST API call for sending otp by authentication type based on settings of your application

Request

Header Params

Body Params application/json

Example
{
    "to": "9174050*****",
    "expiry": 300,
    "otplength": 6,
    "authway": "SMS"
}

Request Code Samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://app.authyo.io/api/v1/auth/sendotp' \
--header 'clientId;' \
--header 'clientSecret;' \
--header 'Content-Type: application/json' \
--data-raw '{
    "to": "9174050*****",
    "expiry": 300,
    "otplength": 6,
    "authway": "SMS"
}'

Responses

🟢200Success
application/json
Body

Example
{
    "success": true,
    "message": "submited successfully",
    "data": {
        "isTried": 1,
        "isSent": 1,
        "results": [
            {
                "success": true,
                "message": "message submitted successfully",
                "to": "919898******",
                "authtype": "WHATSAPP",
                "maskId": "36eeb3a16fAaAab49b48de0d729b9a35",
                "createdTime": 1747312374,
                "expiretime": 1747312434
            }
        ]
    }
}
Modified at 2025-08-23 07:32:43
Previous
Send OTP
Next
Verify OTP
Built with