SSO
Acquire Authorization Code
POST

/oauth/authorize

curl --request POST \
  --url https://api.thanx.com/oauth/authorize \
  --header 'Authorization: Bearer <token>'

Calling this endpoint will send a passwordless email to the email address specified as the username. The response to this request will be a 200 and an empty response body. The passwordless email will contain a link to log in which will redirect the user to the specified redirect_uri with the authorization code included in the query params (?code=...).

If an account does not exist for the specified email, a 401 error will be returned. To create an account, the POST /users endpoint should be used.

curl https://api.thanxsandbox.com/oauth/authorize \
  -X POST \
  -H "Content-Type: application/json" \
  -d '{
    "client_id": "f4bf04a6fc27b5fa926a7318933b76440642c25cde037d8e867b3d18d771ad86",
    "redirect_uri": "https://www.example.com/oauth/callback",
    "response_type": "code",
    "scope": "passwordless",
    "username": "john.smith@example.com"
  }'
""

Request

client_idrequired
string

OAuth Client ID

redirect_urirequired
string

Where you want the user to be redirected

response_typerequired
string

code is the required value

scoperequired
string

passwordless is the required value

usernamerequired
string

The user’s email