Getting started
Authentication
Authenticate API requests with a secret key sent as a Bearer token.
API keys
The API uses secret keys that start with sf_live_. Create and revoke them in Settings › API. You can have up to 20 active keys, so give each app or integration its own: if one leaks, you revoke just that one.
A key gives full access to your transcripts. Keep it on your server, never in a browser app, mobile app or public repository. We only store a fingerprint of each key, so a lost key can't be shown again: create a new one.
Sending the key
Send the key as a Bearer token in the Authorization header of every request:
Authorization: Bearer sf_live_your_key
curl https://scribefiles.com/v1/transcripts \
-H "Authorization: Bearer $SCRIBEFILES_API_KEY"
import os
import requests
session = requests.Session()
session.headers["Authorization"] = f"Bearer {os.environ['SCRIBEFILES_API_KEY']}"
print(session.get("https://scribefiles.com/v1/transcripts").json())
const res = await fetch("https://scribefiles.com/v1/transcripts", {
headers: { Authorization: `Bearer ${process.env.SCRIBEFILES_API_KEY}` },
});
console.log(await res.json());
When authentication fails
- 401
authentication_error: the header is missing, or the key is wrong or revoked. - 403
permission_error: the key is fine, but the account isn't on Unlimited (for example, the subscription ended). Keys start working again when you re-subscribe.
{
"error": {
"type": "authentication_error",
"message": "This API key isn't valid. It may have been revoked.",
"status": 401
}
}
Rotating a key
- Create a new key in Settings › API.
- Deploy it to your app.
- Revoke the old key. Requests using it stop working immediately.
Settings shows when each key was last used, which helps you spot keys you can safely revoke.
Questions about the API? Contact us.