SiteSwapDevelopers
API reference: Sign-in tokens

Sign in (beta)

POSThttps://dev.siteswap.pro/api/v1/auth/session

For 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

emailstringrequired
passwordstringrequired
devicestring
A 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

tokenstringrequired
Send as Authorization: Bearer
expires_atstringrequired
It stops working then. ISO 8601 in UTC
companyobject | nullrequired
company.slugstringrequired
The company's address on SiteSwap, /c/{slug}
company.namestringrequired
company.kindstringrequired
What kind of company, for example contractor or supplier
company.urlstringrequired
Its public page
SiteSwap API v1Support