The Fileflare API uses Bearer token authentication. You generate a key in the Fileflare app and include it on every request. The key has full access to your store’s data — keep it server-side and never ship it to client-side code.
Generate keys in Settings → API. You can revoke and regenerate at any time. Treat keys like passwords.
Authorization header
Add the key as a Bearer token to the Authorization header on every request:
Authorization: Bearer YOUR_API_KEY
Required request headers
Authorization: Bearer YOUR_API_KEY
Accept: application/json
Content-Type: application/json
Example: JavaScript with axios
import axios from 'axios';
axios.defaults.baseURL = 'https://app.digital-downloads.com/api/v1/';
axios.defaults.headers.common = {
'Authorization': 'Bearer YOUR_API_KEY',
'Accept': 'application/json'
};
const orders = await axios.get('/orders');
console.log(orders.data);Rate limits
60 requests per minute per key. The send-email endpoint is more strictly rate-limited at 30 per minute. Each response includes rate-limit headers:
X-RateLimit-Limit: 60
X-RateLimit-Remaining: 47
When you exceed the limit, you’ll get a 429 Too Many Requests. Back off and retry after the window resets.
Error responses
- 401 Unauthorized — your key is missing, malformed, or revoked. Check the Authorization header.
- 402 Payment required — you’ve hit a plan limit (e.g., storage). Upgrade your plan or contact support.
- 404 Not found — the resource doesn’t exist on your account, or the URL path is wrong.
- 422 Validation error — your request body has missing or invalid fields. The response includes a per-field error map (see example below).
- 429 Too many requests — you’ve exceeded the rate limit. Wait and retry.
- 500 Server error — something broke on Fileflare’s side. We’re auto-notified; if it persists, let us know.
422 example response
{
"message": "The filename is required. (and 3 more errors)",
"errors": {
"filename": [
"The filename field is required.",
"The filename must be a string.",
"The filename must not be more than 255 characters."
],
"size": [
"The size field is required."
],
"url": [
"The url field is required."
]
}
}