1. Docs
  2. API Reference
  3. OAuth hosted login: email a one-time MFA code

OAuth hosted login: email a one-time MFA code

POST/oauth/mfa/email-otp/send

Step 1 of the hosted email-OTP MFA factor: emails a one-time code to the identity's verified address for the active challenge_token, then re-renders the challenge page in its "code sent" state with the OAuth parameters replayed. Stays on the "email me a code" view with an error if the send fails. Throttled to 3 requests per minute.

Request body

application/json

challenge_tokenstring Required
client_idstring Required
redirect_uristring Required
response_typestring Required
scopestring Required
statestring Optional
code_challengestring Required
code_challenge_methodstring Required
noncestring Optional

Responses

text/html

string

application/json

  • errorApiErrorBodyDto*

application/json

  • errorApiErrorBodyDto*

Rate limit

3 requests per 1mPer caller: the signed-in user for a bearer token; for an API key, the key and the end user's address when a backend forwards it, otherwise the client address
Request
curl -X POST "https://auth.canopy-io.com/oauth/mfa/email-otp/send" \
  -H "Content-Type: application/json" \
  -d '{
    "challenge_token": "string",
    "client_id": "string",
    "redirect_uri": "string",
    "response_type": "string",
    "scope": "string",
    "state": "string",
    "code_challenge": "string",
    "code_challenge_method": "string",
    "nonce": "string"
  }'
Response
Content-Type: text/html

<!doctype html>
<html lang="en">
  <head>…</head>
  <body>
    <!-- The hosted page: its form, any error, and the Environment's branding -->
  </body>
</html>
Related endpoints Was this page helpful?

Tell us how we can improve this guide.