1. Docs
  2. API Reference
  3. OAuth hosted login: submit the sign-in form

OAuth hosted login: submit the sign-in form

POST/oauth/authorize

The hosted sign-in form's submission (POST /oauth/authorize). Re-validates the authorization parameters, checks the CAPTCHA when the Environment requires one, refuses a password where the address's domain or the Environment does not allow it, verifies the credentials, then runs the shared sign-in gate: the organization's policy, a remembered device, and the MFA decision. Answers with a redirect carrying the authorization code, or with the next page (the MFA challenge, MFA enrollment, the verify-first page for an address never verified, or the sign-in page with the reason). Throttled to 5 requests per 15 minutes.

Request body

application/json

emailstring Required
passwordstring Required
client_idstring Required
redirect_uristring Required
response_typestring Required
scopestring Required
statestring Required
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 `code` and `state` once the sign-in clears, or with `error` and `state` when a verified client's request is refused (an unsupported `response_type`, `code_challenge_method` or scope, a malformed `organization`, or an organization the person does not belong to)

application/json

  • errorApiErrorBodyDto*

text/html

string

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/authorize" \
  -H "Content-Type: application/json" \
  -d '{
    "email": "string",
    "password": "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.