Snag Docs logo

Verify Phone OTP and Connect

Verifies the OTP code and connects the phone number to the user profile.

POSThttps://admin.snagsolutions.io/api/phone_verifications/connect

Verifies the OTP code and connects the phone number to the user profile.

Loading code example
Loading code example

Authorizations

apiKeyAuthstringheaderrequired

API key passed in the header.

Body

Body

phoneNumberstringrequired

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

Pattern: ^\+[1-9]\d{1,14}$
codestringrequired

The OTP code received via SMS

Length: >= 4, <= 10
websiteIdstring<uuid>

The ID of the website

userIdstring<uuid>

The ID of the user

walletAddressstring

The wallet address of the user

Response

application/json

200

dataobjectrequired

Response payload after verifying the OTP code and connecting the phone number

data.successbooleanrequired

Whether the phone number was verified successfully

data.messagestring

Status message

data.errorstring

Error code if verification failed

data.accountLinkDatastring

JWT-encoded data for resolving account link conflicts when the phone is already linked