API referenceAccount
Count unused recovery codes
GET
Zero-PII accounts may hold no email address, so account recovery uses one-time codes generated here. This returns only how many unused codes remain; the codes themselves are shown once at generation and cannot be read back.
CognitoUserPoolheader
AuthorizationBearer <token>Cognito user pool ID token. API Gateway validates the token (identity
token: no OAuth scopes are configured on the authorizer) and forwards
its claims; the sub claim is the tenant key.
Remaining code count.
application/json- response
remaining*integerUnused recovery codes.
curl -X GET "https://example.com/account/recovery-codes"{ "remaining": 0}