Authentication
Learn how to authenticate your requests to the Pullbay API using Bearer tokens. This guide covers getting your API key, implementing authentication in multiple languages, managing key security, and rotating keys safely.
Getting Your API Key
Every Pullbay API request requires authentication with an API key.
Sign in
Sign in to your Pullbay Dashboard
Never share your API keys. Treat them like passwords.
How to Authenticate
Every request to the Pullbay API must include your API key in the Authorization header using the Bearer scheme:
Authorization: Bearer YOUR_API_KEYcURL
curl "https://api.pullbay.com/appstore/reviews?appId=284882215&maxItems=5" \
-H "Authorization: Bearer YOUR_API_KEY"Python
import requests
import os
api_key = os.environ["PULLBAY_API_KEY"]
response = requests.get(
"https://api.pullbay.com/appstore/reviews",
params={"appId": "284882215", "maxItems": 5},
headers={"Authorization": f"Bearer {api_key}"},
timeout=30,
)
print(response.json())Node.js (Axios)
Node.js (Fetch)
PHP
Go
Authentication Errors
A failed authentication returns 401 Unauthorized:
Missing Authorization header
Add Authorization: Bearer YOUR_API_KEY to every request
Wrong header format
Must be Authorization: Bearer YOUR_KEY — capital B, space after "Bearer"
API key revoked
Generate a new key in the dashboard and update your application
API key not yet active
Wait a few seconds after creation and retry
Failed requests — including 401 — do not consume credits.
API Key Management
Creating a Key
Go to API Keys
Go to dashboard.pullbay.com → API Keys
Rotating a Key Safely (Zero Downtime)
Revoking a Key
Any application still using the revoked key will begin receiving 401 responses. Update your code before revoking.
Viewing Key Usage
Go to API Keys, select a key, and view its activity log:
Total requests made with this key
Requests by endpoint
Requests by date
Credits consumed
Security Best Practices
Storage
Use environment variables — never hardcode a key in source code
Use a secrets manager in production (AWS Secrets Manager, Google Secret Manager, HashiCorp Vault)
Add
.envfiles to.gitignore— keys committed to version control are exposed even if later removed
Access
One key per application — use separate keys for your mobile app, backend service, n8n workflow, and so on
Keep live keys out of development — use a key scoped to your development environment for local testing
Rotate every 90 days or whenever team membership changes
Revoke unused keys promptly — unused keys are attack surface
What Not to Do
Don't commit keys to Git — even if you remove them later, they remain in commit history
Don't include keys in client-side code — browser JavaScript is readable to anyone
Don't share keys via email, Slack, or chat — use a password manager or secrets manager
Don't log keys — make sure debug output and log files never capture the
Authorizationheader
Common Questions
Last updated