Keys and sign-in¶
The token header¶
Send your key in the token header on every request. Requests use HTTPS, and answers are
plain JSON.
The two kinds of key¶
| API key | Venue key | |
|---|---|---|
| Routes | /external/v1/... |
/partners/... |
| Covers | The venues chosen for your integration | One venue |
| Permissions | Set per route, see What your key can reach | All venue routes for that venue |
| Bad key answers | 401 |
400 |
An API key does not work on the venue routes, and a venue key does not work on the API routes. A third kind of key, for event publishers, works only on the publisher feeds.
Keeping a key safe¶
- Keep it on your server. Never put it in a web page, a mobile app, a URL or a log.
- A key does not expire by itself. It works until we replace or remove it.
- Tell your Speakeasy contact right away if a key may have leaked.
Replacing a key¶
Your Speakeasy contact makes the new key. The old key stops working the moment the new one is made, so agree on a time and switch your systems over right then. There is no period where both keys work.
A good key that gets a 401¶
If a key that worked a moment ago gets a 401, wait a little and try again before you ask
for a new one. A short problem on our side can show up as a 401 today.