Skip to content

Validate SMS OTP

Request

Validate a one-time passcode sent by SMS to a user. The endpoint will return a URI which can be used to redirect the client in order to complete authentication.

Required permissions: apps:execute, [appId]:execute, auth:execute.

Security
ClientAccessToken
Bodyapplication/jsonrequired
phone_numberstringrequired

Phone number that the SMS OTP was sent to

passcodestringrequired

OTP to validate

response_typestring

Response type requested for the authentication flow.

Default:"code"
Enum:"code""id_token"
noncestring

A random value that will associate the client request with the ID token, and used to mitigate replay attacks. It will be added to the ID token and the backend service should only accept ID tokens that include the same nonce value as the one included in the original request.

curl -i -X POST \
  https://api.sbx.transmitsecurity.io/cis/v1/auth/otp/sms/validation \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "phone_number": "string",
    "passcode": "string",
    "response_type": "code",
    "nonce": "string"
  }'

Responses

Bodyapplication/json
resultstringread-onlyrequired

URI used to complete the flow. Sending a GET request to this URI will redirect the browser to your redirect URI with a code to exchange for user tokens.

Response
{ "result": "string" }