POST
/
auth
/
v1
/
initiate
/
otp
curl --request POST \
  --url https://auth.otpless.app/auth/v1/initiate/otp \
  --header 'Content-Type: application/json' \
  --header 'clientId: <api-key>' \
  --header 'clientSecret: <api-key>' \
  --data '{
  "email": "your@email.com",
  "expiry": 30,
  "otpLength": 4,
  "channels": [
    "EMAIL"
  ],
  "metadata": {
    "key1": "Data1",
    "key2": "Data2"
  }
}'
{
  "requestId": "unique_request_id"
}

This API is accessible exclusively to users subscribed to the OTPless Pro plan. Ensure you have an active OTPless Pro Plan subscription to utilize this feature.

Authorizations

clientId
string
header
required
clientSecret
string
header
required

Body

application/json

Response

200
application/json
OTP initiated successfully

The response is of type object.