Appearance
Authentication
SheetsToJson uses API keys to authenticate requests to the API. All API requests must include your API key in the headers.
Getting Your API Key
- Sign up for a free account
- Register a Google Sheet to get started
- Navigate to the API Keys section for your sheet
- Click Create API Key and give it a name
- Copy your API key (you won't be able to see it again!)
Keep Your API Keys Secret
API keys grant access to your sheet data. Never commit them to version control or expose them in client-side code.
Using Your API Key
Include your API key in the X-API-Key header with every request:
bash
curl -H "X-API-Key: your_api_key_here" \
https://api.sheetstojson.com/api/v1/SHEET_ID/Sheet1API Key Permissions
When creating an API key, you can configure permissions:
| Permission | Description |
|---|---|
| Read | Get data from your sheet (GET requests) |
| Write | Create, update, and delete rows (POST, PUT, DELETE) |
| Schema | Refresh and view sheet schema |
| Analytics | View usage analytics |
Best Practice
Create separate API keys for different applications or environments (development, staging, production). This makes it easier to rotate keys and revoke access if needed.
API Key Security
Do's ✅
- Store API keys in environment variables
- Use different keys for development and production
- Rotate keys periodically
- Revoke unused or compromised keys immediately
- Limit permissions to only what's needed
Don'ts ❌
- Never commit API keys to Git
- Don't expose keys in client-side JavaScript
- Don't share keys in public forums or documentation
- Don't reuse the same key across multiple applications
Rate Limits
API keys are subject to rate limits based on your subscription plan:
| Plan | Requests per Month |
|---|---|
| Free Trial | 3,000 (100/day) |
| Starter | 10,000 |
| Professional | 100,000 |
| Business | 1,000,000 |
When you exceed your rate limit, you'll receive a 429 Too Many Requests response:
json
{
"success": false,
"error": "rate_limit_exceeded",
"message": "Rate limit exceeded. Upgrade your plan or try again later.",
"retry_after": 3600
}Managing API Keys
List All Keys
View all API keys for a sheet in your dashboard.
Update Key Permissions
You can update permissions for an existing key without creating a new one:
- Go to your sheet's API Keys page
- Click Edit next to the key
- Toggle permissions on/off
- Click Save Changes
Revoke a Key
To revoke an API key:
- Go to your sheet's API Keys page
- Click Revoke next to the key
- Confirm the revocation
Revoking is Permanent
Once revoked, an API key cannot be restored. Any applications using that key will immediately lose access.
Troubleshooting
401 Unauthorized
Problem: Your API key is invalid or missing.
Solutions:
- Ensure you're including the
X-API-Keyheader - Check that your API key hasn't been revoked
- Verify you're using the correct API key for this sheet
403 Forbidden
Problem: Your API key doesn't have permission for this operation.
Solutions:
- Check your key's permissions in the dashboard
- Create a new key with the required permissions
- Contact support if you need elevated access
429 Rate Limited
Problem: You've exceeded your plan's rate limit.
Solutions:
- Wait for the rate limit window to reset (check
retry_afterheader) - Upgrade to a plan with higher limits
- Optimize your code to make fewer requests (use caching, batch operations)

