Authorization header on every call:
API keys
Settings > Access > API keys lists the organization’s keys with their name, owner, scopes, when they were created, when they expire and when they were last used. To create one, press New API key, give it a name, pick an expiry date (or none) and tick the scopes it needs. Copy the key when it is shown, because it is never shown again. Keys that expire are safer. A key belongs to the member who made it and to the organization it was made in:- It can never do more than that member can. Each call needs both the member’s permission and one of the key’s scopes. See Permissions and scopes.
- It cannot reach any other organization.
- If the member leaves the organization, the key stops working.
401 from then on, and the key stays in the list marked as revoked.
When a token fails
Keep keys out of source control and client-side code. Load them from your secret store or environment, as the examples here do with
STOCKSHIFT_TOKEN.