API reference: Sign-in tokens
Sign in (beta)
POST
https://dev.siteswap.pro/api/v1/auth/sessionFor the phone apps: signs a person in with their email and password and returns a token that works like a key with every scope, for that person in their company. Rate limited per address and per email. The person must have accepted the current Terms on the site.
Beta This may change before the phone apps ship.
No key needed.
Body
emailstringrequiredpasswordstringrequireddevicestringA name for the device, shown to the person
Responses
201Created
400bad_request, key_in_url or invalid_json: the request could not be read
413too_large: the body is over 256 KB
429rate_limited or daily_quota: wait for Retry-After seconds
Response fields
tokenstringrequiredSend as
Authorization: Bearerexpires_atstringrequiredIt stops working then. ISO 8601 in UTC
companyobject | nullrequiredcompany.slugstringrequiredThe company's address on SiteSwap,
/c/{slug}company.namestringrequiredcompany.kindstringrequiredWhat kind of company, for example
contractor or suppliercompany.urlstringrequiredIts public page
SiteSwap API v1Support