Skip to main content

Overview

TXCloud uses API keys to authenticate requests. All API requests must include your API key in the Authorization header using Bearer token authentication.

API Key Types

TXCloud provides two types of API keys:
Never expose your API keys in client-side code. API keys should only be used in server-side applications.

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:
Follow the principle of least privilege — only grant the permissions each key needs.

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.
Revoking a key is immediate and irreversible. Ensure you’ve updated all applications first.

Required Headers

Every API request should include these headers:

Authentication Errors

Error Response Example

Best Practices

Store API keys in environment variables, not in code:
Create separate keys for development, staging, and production.
Check the dashboard regularly for unusual activity.
Restrict production keys to known server IPs.
Rotate production keys every 90 days.

Next Steps

Rate Limits

Understand API rate limits

Error Handling

Handle errors gracefully