SiteSwapDevelopers
Guides

Using the API from the phone app

Sign-in tokens for people, in beta.

The phone apps call the same /api/v1 as everyone else, but as a person rather than as a company key. A person signs in with their email and password:

curl -X POST "https://dev.siteswap.pro/api/v1/auth/session" -H "Content-Type: application/json" \
  -d '{"email":"[email protected]","password":"your password","device":"iPhone"}'
  • The token (sst_...) goes in Authorization: Bearer, like a key. It works for 30 days, for that person in their first company, with every scope their role allows.
  • DELETE /auth/session with the token signs out.
  • Sign-in tries are limited to 12 every 15 minutes per address. A wrong email or password answers 401 wrong_password, the same for both.
  • The person must have accepted the current Terms on the site, or signing in answers 403 terms_required. Signing up and accepting new Terms happen on the site.
  • Keep the token in the phone's secure storage, never in plain files.
SiteSwap API v1Support