Developers
Keys and authentication
Getting a key
A team manager creates API keys for the team in the FieldSignal web portal. Creating a key asks for the manager's second sign-in step. A key can have an end date; without one it works until it is revoked. A team can have up to 10 active keys.
- A key belongs to the team, not to a person. It keeps working if the manager who created it leaves the team.
- The key is shown once. FieldSignal keeps only a one-way fingerprint of it and cannot show it again. A lost key can only be revoked and replaced.
- Keep it secret. Store it in your server's secret store. Do not put it in public code, in an app or web page others can download, or in a message.
- If a key may have been exposed, revoke it at once in the portal and write to security@fieldsignal.com.
Sending the key
Send the key in the Authorization header, exactly like this:
Authorization: Bearer fsk_live_...
"Bearer" must be written with a capital B, followed by one space and the key. A header in any other form is answered as a missing key (401 API_KEY_MISSING).
When a key is refused
| Status | Code | Meaning |
|---|---|---|
| 401 | API_KEY_MISSING |
No key, or not sent as Authorization: Bearer <key>. |
| 401 | API_KEY_INVALID |
The key is not one FieldSignal issued. |
| 401 | API_KEY_REVOKED |
The key has been revoked. |
| 401 | API_KEY_EXPIRED |
The key has reached its end date. |
| 403 | API_PLAN_REQUIRED |
The team's plan does not include the API. The key works again once it does. |
A key reads the whole of its own team's data and nothing else. Something that belongs to another team is answered as not found (404 NOT_FOUND).
Documentation version 1.0.1