POST
/
auth
/
v1
/
verify
/
code
curl --request POST \
  --url https://auth.otpless.app/auth/v1/verify/code \
  --header 'Content-Type: application/json' \
  --header 'clientId: <api-key>' \
  --header 'clientSecret: <api-key>' \
  --data '{
  "code": "CODE"
}'
{
  "requestId": "unique_request_id",
  "message": "Code verified successfully",
  "userDetails": {
    "token": "tokenvalue",
    "status": "SUCCESS",
    "completedAt": 1724276345786,
    "identities": [
      {
        "identityType": "MOBILE/EMAIL",
        "identityValue": "IdentityValue",
        "channel": "MAGIC_LINK",
        "methods": [
          "WHATSAPP/SMS/VIBER/EMAIL"
        ],
        "verified": true,
        "verifiedTimestamp": 1724276345786
      }
    ],
    "network": {
      "ip": "192.168.0.1"
    },
    "deviceInfo": {
      "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36",
      "platform": "MacIntel",
      "vendor": "Google Inc.",
      "language": "en-GB",
      "cookieEnabled": true,
      "screenWidth": 1512,
      "screenHeight": 982,
      "screenColorDepth": 30,
      "devicePixelRatio": 2
    }
  }
}

Authorizations

clientId
string
header
required
clientSecret
string
header
required

Body

application/json
code
string
required

The code to be verified.

Example:

"CODE"

Response

200
application/json
Code verified successfully
requestId
string

The unique identifier for the code verification request.

Example:

"unique_request_id"

message
string

A message indicating the result of the verification.

Example:

"Code verified successfully"

userDetails
object