Overview
TXCloud uses API keys to authenticate requests. All API requests must include your API key in theAuthorization header using Bearer token authentication.
API Key Types
TXCloud provides two types of API keys:Getting Your API Key
1
Log in to Dashboard
Go to dashboard.txcloud.io and sign in.
2
Navigate to API Keys
Click on Settings in the sidebar, then select API Keys.
3
Create New Key
Click Create API Key and configure:
- Name: A descriptive name (e.g., “Production Server”)
- Environment: Test or Live
- Permissions: Select which APIs the key can access
- IP Whitelist: (Optional) Restrict to specific IPs
4
Copy Your Key
Copy the key immediately — it won’t be shown again!
Making Authenticated Requests
API Key Permissions
When creating an API key, you can restrict access to specific APIs:IP Whitelisting
For additional security, you can restrict API keys to specific IP addresses:IP whitelisting is optional but recommended for production keys.
Key Rotation
We recommend rotating your API keys periodically:1
Create New Key
Create a new API key with the same permissions.
2
Update Your Application
Deploy the new key to your application.
3
Verify New Key Works
Confirm requests are succeeding with the new key.
4
Revoke Old Key
Delete the old API key from the dashboard.
Required Headers
Every API request should include these headers:Authentication Errors
Error Response Example
Best Practices
Use Environment Variables
Use Environment Variables
Store API keys in environment variables, not in code:
Use Different Keys per Environment
Use Different Keys per Environment
Create separate keys for development, staging, and production.
Monitor Key Usage
Monitor Key Usage
Check the dashboard regularly for unusual activity.
Enable IP Whitelisting
Enable IP Whitelisting
Restrict production keys to known server IPs.
Rotate Keys Regularly
Rotate Keys Regularly
Rotate production keys every 90 days.
Next Steps
Rate Limits
Understand API rate limits
Error Handling
Handle errors gracefully