1. Docs
  2. API Reference
  3. How many recovery codes the caller has left

How many recovery codes the caller has left

GET/v1/auth/mfa/recovery-codes

Returns the authenticated administrator's recovery-code generation and how many of its ten codes are still unused, for the profile page's count. Never the codes themselves: those are shown once, when issued.

Authentication

Bearer TokenAuthorization

JWT access token. Never send alongside X-API-Key: a request carrying both is refused.

Responses

application/json

  • dataUserMfaRecoveryCodesSummaryDto*

application/json

  • errorApiErrorBodyDto*

application/json

  • errorApiErrorBodyDto*

Returned object

Request
curl -X GET "https://auth.canopy-io.com/v1/auth/mfa/recovery-codes" \
  -H "Authorization: Bearer $CANOPY_TOKEN"
Response
{
  "data": {
    "generation": 0,
    "remaining": 0
  }
}
Related endpoints
GETList the caller's enrolled second factors
POSTBegin authenticator app enrollment
POSTComplete authenticator app enrollment
POSTBegin passkey enrollment
POSTComplete passkey enrollment
POSTProve a fresh second factor before a sensitive change
POSTBegin a passkey step-up
POSTComplete a passkey step-up
DELETERemove one of the caller's second factors
POSTRegenerate the caller's recovery codes
GETList the caller's remembered devices
DELETEForget every remembered device
DELETEForget one remembered device
Was this page helpful?

Tell us how we can improve this guide.