Skip to main content
POST
/
auth
/
otp
/
send-sign-in-code
Send sign-in code
curl --request POST \
  --url https://api.stack-auth.com/api/v1/auth/otp/send-sign-in-code \
  --header 'Content-Type: application/json' \
  --data '
{
  "email": "johndoe@example.com",
  "callback_url": "https://example.com/handler/magic-link-callback"
}
'
{
  "nonce": "u3h6gn4w24pqc8ya679inrhjwh1rybth6a7thurqhnpf2"
}

Documentation Index

Fetch the complete documentation index at: https://stackauth-e0affa27-chore-move-mcp-to-a-sep-app.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

Body

application/json
email
string
required

The email to sign in with.

Example:

"johndoe@example.com"

callback_url
string
required

The base callback URL to construct the magic link from. A query parameter code with the verification code will be appended to it. The page should then make a request to the /auth/otp/sign-in endpoint.

Example:

"https://example.com/handler/magic-link-callback"

bot_challenge_token
string
bot_challenge_phase
string
bot_challenge_unavailable
string

Response

200 - application/json

Successful response

nonce
string
required

A token that must be stored temporarily and provided when verifying the 6-digit code

Example:

"u3h6gn4w24pqc8ya679inrhjwh1rybth6a7thurqhnpf2"