Get API Token
To use RushDB, you'll need an API token for authentication. Here's how to get one:
1. Create an Account
Visit RushDB Dashboard and sign up for an account if you haven't already.
2. Create a Project
- After signing in, click on "New Project"
- Enter a name for your project
- Choose your preferred region
- Click "Create"
3. Generate API Token
- In your project dashboard, navigate to the "API Tokens" section
- Click "Generate New Token"
- Give your token a name (e.g., "Development", "Production")
- Choose the appropriate permissions:
read
- Read access to records and relationshipswrite
- Create and update records and relationshipsdelete
- Delete records and relationshipsadmin
- Full access, including managing project settings
- Click "Generate Token"
4. Copy and Store Your Token
Your API token will be displayed only once. Make sure to:
- Copy the token immediately
- Store it securely
- Never commit it to version control
- Use environment variables or secure configuration management
Example of using environment variables:
- TypeScript
- Python
- REST API
// Load from environment variable
const db = new RushDB({
apiToken: process.env.RUSHDB_API_TOKEN
});
import os
db = RushDB(api_token=os.environ['RUSHDB_API_TOKEN'])
# Set in your shell
export RUSHDB_API_TOKEN='your-api-token'
# Use in requests
curl -H "Token: $RUSHDB_API_TOKEN" \
https://api.rushdb.com/api/v1/records
Token Security
- Keep your tokens secure and private
- Rotate tokens periodically
- Use different tokens for development and production
- Limit token permissions to only what's needed
- Monitor token usage in the dashboard
- Revoke tokens immediately if compromised
Next Steps
- Follow the Quick Tutorial to start using your token
- Learn about RushDB
- Check out the Basic Concepts