Key Types
Every application automatically gets two API keys:Test Keys (sk_test_app_*)
Test keys are for development and testing:
- Work with the Playground
- Completely free (no charges)
- Cannot send real SMS/MMS
- Ideal for development and CI/CD
Live Keys (sk_live_app_*)
Live keys are for production use:
- Send real SMS/MMS messages
- Incur charges based on usage
- Use only when ready for production
Permissions
App keys can perform these operations: Messaging- Send SMS and MMS messages
- View message history
- Check message status
- Create and manage webhooks
- View webhook delivery logs
- Update webhook configuration
- Assign phone numbers to the application
- Remove phone numbers from the application
- View assigned phone numbers
Getting Your App Keys
Via Dashboard:- Log in to the Chirp dashboard
- Select your application
- Navigate to the Keys page
- Copy your test or live key
Using App Keys
Include your app key in theAuthorization header:
Test vs Live Mode
The key you use determines the mode: Test Mode (usingsk_test_app_*)
- Messages appear in the Playground
- No real SMS sent
- No charges incurred
- Webhooks triggered to test endpoints
sk_live_app_*)
- Real SMS/MMS sent
- Charges apply
- Production phone numbers used
- Webhooks triggered normally
Switching Between Modes
To move from testing to production:- Test thoroughly with your test key
- Verify webhooks work correctly
- Replace
sk_test_app_*withsk_live_app_*in your code - Deploy to production
Creating Additional Keys
You can create multiple app keys for different purposes: Via Dashboard:- Go to your application’s Keys page
- Click “Create Key”
- Enter a name (e.g., “Production Server”, “CI/CD Pipeline”)
- Select type (test or live)
- Copy the key (shown only once)
Revoking Keys
If a key is compromised, revoke it immediately: Via Dashboard:- Go to your application’s Keys page
- Find the compromised key
- Click “Delete” and confirm
Best Practices
1. Keep Keys Secret Never expose app keys in:- Client-side code
- Public repositories
- Version control
- Screenshots or documentation
- Development
- Staging
- Production
Troubleshooting
401 Unauthorized Error- Verify you’re using the correct key format
- Check the key hasn’t been deleted
- Ensure you’re using an app key (not an admin key)
- Test keys only work with the Playground
- Live keys only send real messages
- Verify you’re using the correct key type for your environment