1. Docs
  2. API Reference
  3. OAuth hosted login: email a passwordless login code

OAuth hosted login: email a passwordless login code

POST/oauth/login/email-otp/start

Step 1 of the hosted passwordless email-OTP login: emails a one-time login code for the supplied email. Gated per-Environment on email_otp_login_enabled and (when enabled) login_require_captcha verification of captcha_token. Anti-enumeration — always renders a generic "code sent" page whether or not the identity exists; only a disabled-method or failed-CAPTCHA case re-renders the form with an error. Throttled to 5 requests per 15 minutes.

Request body

application/json

emailstring Required
client_idstring Required
redirect_uristring Required
response_typestring Required
scopestring Required
statestring Optional
code_challengestring Required
code_challenge_methodstring Required
noncestring Optional
organizationstring Optional
captcha_tokenstring Optional

The solved CAPTCHA, posted by the widget on the form when the Environment requires one.

Responses

text/html

string

A redirect to the client's `redirect_uri` with `error` and `state`: the client and its `redirect_uri` are verified but the request is refused (an unsupported `response_type`, `code_challenge_method` or scope, or a malformed `organization`)

application/json

  • errorApiErrorBodyDto*

application/json

  • errorApiErrorBodyDto*

Rate limit

5 requests per 15mPer 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/login/email-otp/start" \
  -H "Content-Type: application/json" \
  -d '{
    "email": "string",
    "client_id": "string",
    "redirect_uri": "string",
    "response_type": "string",
    "scope": "string",
    "state": "string",
    "code_challenge": "string",
    "code_challenge_method": "string",
    "nonce": "string",
    "organization": "string",
    "captcha_token": "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.