Text me a code
Sets the caller's Cognito phone_number to this number and Cognito texts a code to it (the attribute's own verification, with the session's access token). The profile does not change until the code is confirmed. US and Canadian numbers may be written without +1; others start with + and the country code. Limits: a code a minute, 5 an hour and 10 a day per person, and 3 an hour and 5 a day per number whoever asks (429 too_many_codes with details.retry_after_seconds and Retry-After). Already verified with this number: nothing is sent. 503 phone_verification_unavailable ("Phone verification isn't available yet") until the service is switched on and the user pool can send SMS, or when the session's access token can't make these calls. Refused while impersonating and for API keys. The number and the code are never logged.
Authorizations
In the browser, authentication rides on the httpOnly session cookies set by /cognito/signin or the Google / Apple sign-in at /cognito/oauth/{provider}. For scripts and for Swagger UI testing, paste an API key (fh_live_…, created with POST /api-keys); a Cognito JWT is accepted too. Sign-in does not return a token in its body.
Request Body
Responses
The code was sent (or the number is already verified).