Overview
The PricingSaaS Intelligence API uses Bearer Token authentication with API keys. All API requests must include your API key in theAuthorization header.
Getting Your API Key
1
Create an Account
Sign up at api.pricingsaas.com to access your dashboard
2
Generate API Key
In your dashboard, navigate to API Keys and click Generate New Key
3
Name Your Key
Give your API key a descriptive name (e.g., “Production App”, “Development”)
4
Copy and Store
Copy the generated key immediately - it will only be shown once!
Making Authenticated Requests
Include your API key in theAuthorization header with the Bearer scheme:
Environment Variables
Local Development
Create a.env file in your project root:
.env
Production Deployment
Set environment variables in your hosting platform:- Vercel
- Netlify
- AWS Lambda
- Docker
Authentication Errors
The API returns specific error codes for authentication issues:API key is missing or invalidSolution: Check that your API key is correctly included in the Authorization header
API key is valid but lacks permission for the requested resourceSolution: Upgrade your plan or contact support to enable this feature
Managing API Keys
View All Keys
View all your API keys in the dashboard to see:- Key name and creation date
- Last used timestamp
- Usage statistics
- Key status (active/revoked)
Rotate Keys
1
Generate New Key
Create a new API key in your dashboard
2
Update Applications
Update your applications to use the new key
3
Test Thoroughly
Verify all applications work with the new key
4
Revoke Old Key
Once confirmed, revoke the old key to prevent unauthorized access
Pro Tip: We recommend rotating your API keys every 90 days for enhanced security.
Revoke Keys
If you suspect your API key has been compromised:- Immediately revoke the compromised key in your dashboard
- Generate a new key for your applications
- Review API logs to check for suspicious activity
- Update all applications with the new key
Security Best Practices
Use Environment Variables
Use Environment Variables
Never hardcode API keys in your source code. Always use environment variables or secret management services like AWS Secrets Manager, HashiCorp Vault, or similar.
Use HTTPS Only
Use HTTPS Only
Always make API requests over HTTPS. The API will reject HTTP requests to prevent key interception.
Backend Only
Backend Only
Never expose your API key in client-side code (JavaScript, mobile apps). Make API calls from your backend server or serverless functions.
Rotate Regularly
Rotate Regularly
Rotate your API keys periodically (every 90 days recommended) to minimize risk if a key is compromised.
Monitor Usage
Monitor Usage
Regularly check your API usage dashboard for unexpected spikes or unusual patterns that might indicate unauthorized use.
Use Separate Keys
Use Separate Keys
Use different API keys for development, staging, and production environments to limit blast radius if a key is compromised.