Using the ID for the User that you created earlier, add an SMS factor for that User:
- In Postman, open the Factors (Okta API) collection and then the Factor Lifecycle Operations collection.
- Select the Enroll Okta SMS Factor request template. The request appears on the right.
- In the request URL, replace the
{userId}
variable with the user ID that you saved in the last step. - Replace the
{phoneNumber}
variable with the phone number you want to use for this test. - Click Send to add the SMS Factor for your user. A successful request results in an HTTP status code of
200
and a JSON payload response. The request also results in an SMS stating "Your verification code is" followed by a numerical code. Save this code. - Save the Factor ID value (
id
) from the response.
Note: If you don't receive an SMS, wait 30 seconds and try again by sending the same body payload to the /resend
URL found in the Factor's _links
object.