Skip to content

Send a Phone Challenge

Request

OAuth 2.0 scope:
  • okta.myAccount.phone.manage

Sends a phone challenge using one of two methods: SMS or CALL. This request can also handle a resend challenge (retry).

Upon a successful challenge, the user receives a verification code by SMS or CALL. Send a POST request to the /idp/myaccount/phones/{id}/verify endpoint to use the verification code to verify the phone number. The verification code expires in five minutes.

Notes:

  • Sending requests to the /idp/myaccount/phones/{id}/challenge endpoint more often than once every 30 seconds, or at a rate that exceeds the rate limit rule configured by the admin, returns a 429 (Too Many Requests) error.
Path
idstringrequired

ID of the phone. Obtain the ID of the phone through GET /idp/myaccount/phones or POST /idp/myaccount/phones when adding a new phone.

Example:sms18vtfKgzqDhNqP0g4
Headers
Acceptstringrequired

Specifies the API version. Current version: 1.0.0

Example:application/json; okta-version=1.0.0
Bodyapplication/json
methodstringwrite-onlyrequired

The method with which the challenge should be sent

Enum:"SMS""CALL"
Example:"SMS"
retryboolean

Indicates whether this is a normal challenge or retry

Default:false
POST
/idp/myaccount/phones/{id}/challenge
curl -i -X POST \
  https://okta-subdomain.pixtulate.com/idp/myaccount/phones/sms18vtfKgzqDhNqP0g4/challenge \
  -H 'Accept: application/json; okta-version=1.0.0' \
  -H 'Content-Type: application/json' \
  -d '{
    "method": "SMS"
  }'

Responses

Example response after challenging a phone

Bodyapplication/json;okta-version=1.0.0
Response
{ "_links": { "verify": {} } }