Liftbay
API referenceAuth

Sign in with an email code (CLI)

POST
/v1/auth/email/token

Like /email/verify, but for the CLI: returns a CLI session token instead of setting a cookie. Signing in for the first time creates the account. Start with /email/start.

Request Body

application/json
  1. body
email*string
Formatemail
Lengthlength <= 254
code*string
Match^\d{6}$

Response Body

OK

application/json
  1. response
token*string

CLI session token (lbs_…), sent as a Bearer token

user*
curl -X POST "https://example.com/v1/auth/email/token" \  -H "Content-Type: application/json" \  -d '{    "email": "user@example.com",    "code": "string"  }'
{  "token": "string",  "user": {    "id": "string",    "email": "string",    "name": "string",    "avatarUrl": "string"  }}