POST
/
passcode
/
login
/
initialize
Initialize passcode login
curl --request POST \
  --url https://{tenant_id}.hanko.io/passcode/login/initialize \
  --header 'Content-Type: application/json' \
  --data '{
  "user_id": "c339547d-e17d-4ba7-8a1d-b3d5a4d17c1c",
  "email_id": "c339547d-e17d-4ba7-8a1d-b3d5a4d17c1c"
}'
{
  "id": "c339547d-e17d-4ba7-8a1d-b3d5a4d17c1c",
  "ttl": 300,
  "created_at": "2023-11-07T05:31:56Z"
}
Deprecated. Please use the Flow API instead. What’s the Flow API?.
Initialize a passcode login for the user identified by user_id. Sends an email containing the actual passcode to the user’s primary email address or to the address specified through email_id. Returns a representation of the passcode.

Body

application/json
user_id
string<uuid4>
required

The ID of the user

Example:

"c339547d-e17d-4ba7-8a1d-b3d5a4d17c1c"

email_id
string<uuid4>

The ID of the email address

Example:

"c339547d-e17d-4ba7-8a1d-b3d5a4d17c1c"

Response

Successful passcode login initialization

Representation of a passcode

id
string<uuid4>

The ID of the passcode

Example:

"c339547d-e17d-4ba7-8a1d-b3d5a4d17c1c"

ttl
integer

Lifespan of a passcode in seconds

Example:

300

created_at
string<date-time>

Time of creation of the passcode