Skip to main content
POST
/
api
/
phone
/
auth
/
connect
Verify Phone OTP and Connect
curl --request POST \
  --url https://admin.snagsolutions.io/api/phone/auth/connect \
  --header 'Content-Type: application/json' \
  --header 'X-API-KEY: <api-key>' \
  --data '
{
  "phoneNumber": "+14155552671",
  "code": "123456",
  "websiteId": "123e4567-e89b-12d3-a456-426614174000",
  "userId": "123e4567-e89b-12d3-a456-426614174001",
  "walletAddress": "0x1234567890abcdef1234567890abcdef12345678"
}
'
{
  "success": true,
  "message": "Phone number verified.",
  "error": "MAXIMUM_ACCOUNT_LINKED"
}

Authorizations

X-API-KEY
string
header
required

Body

application/json

Body

Request body for verifying OTP and connecting phone number

phoneNumber
string
required

Phone number in E.164 format (e.g., +14155552671)

Example:

"+14155552671"

code
string
required

The OTP code received via SMS

Required string length: 4 - 10
Example:

"123456"

websiteId
string<uuid>

The ID of the website

Example:

"123e4567-e89b-12d3-a456-426614174000"

userId
string<uuid>

The ID of the user

Example:

"123e4567-e89b-12d3-a456-426614174001"

walletAddress
string

The wallet address of the user

Example:

"0x1234567890abcdef1234567890abcdef12345678"

Response

200

Response after verifying OTP code

success
boolean
required

Whether the phone number was verified successfully

Example:

true

message
string

Status message

Example:

"Phone number verified."

error
string

Error code if verification failed

Example:

"MAXIMUM_ACCOUNT_LINKED"