Verify a code
Checks a code the user entered. Returns valid, invalid or expired. After 5 wrong attempts the code is locked.
Checks a code the user entered. Returns valid, invalid or expired. After 5 wrong attempts the code is locked.
bearerAuthorizationBearer <JWT>Your secret API key: sk_live_… for live traffic or sk_test_… for testing.
application/json- body
id?stringThe OTP ID returned when the code was sent. Provide this or to.
to?stringThe phone number the code was sent to. Verifies the latest code for that number.
length <= 32code*stringThe code the user entered.
^\d{4,8}$The result of the check.
application/jsoncurl -X POST 'https://api.appstractone.com/v1/otp/verify' \
-H 'Content-Type: application/json' \
-d '{
"code": "102028"
}'{
"status": "valid"
}Send a code POST
Generates a one-time code and sends it by SMS. A new code replaces any pending code for the same number. With a test key the code is returned in the response and nothing is sent.
Request a sender ID POST
Requests a new sender ID. Our team reviews it with the mobile networks, usually within a few working days. You will get a sender_id.updated webhook when it is approved or rejected.