API Keys
Manage authentication credentials for your organization’s API access to Scout.
Overview
API Keys (Org Credentials) let you authenticate API requests to Scout services. Use them as bearer tokens for simple API calls, or as signing keys for more secure integrations.
Org Credentials are the modern successor to Legacy API Keys, offering enhanced security features while maintaining full backward compatibility.
Note: Org Credentials are asymmetric key pairs. When using bearer token authentication, use the private key portion of your Org Credential as the token value. The private key can be viewed in the Scout Studio UI.
Org Credentials vs. Legacy Keys
| Feature | Legacy Key | Org Credentials |
|---|---|---|
| Single key per org | ✅ | ❌ (multiple) |
| Enable/disable toggle | ❌ | ✅ |
| Rotation support | ❌ | ✅ |
| Named keys | ❌ | ✅ |
| Key pair (public/private) | ❌ | ✅ |
| Future: Scoped permissions | ❌ | ✅ (planned) |
Legacy Keys continue to work. If you have an existing Legacy Key, you don’t need to migrate immediately—we recommend planning a transition at your convenience.
Creating API Keys
Prerequisites
- Organization admin permissions
- Access to Scout Studio
Steps
- Navigate to Settings → API Keys in Scout Studio
- Click Create New Key
- Enter a descriptive name (e.g., “Production API”, “CI/CD Pipeline”)
- Click Generate
Your new key is active immediately and ready for use.
Using API Keys
Bearer Token Authentication
Include the key in your request headers:
curl -X GET "https://api.scoutos.com/drive/list" \
-H "Authorization: Bearer YOUR_API_KEY"SDK Authentication
Python:
from scoutos import Scout
client = Scout(api_key="YOUR_API_KEY")TypeScript:
import { ScoutClient } from "scoutos";
const client = new ScoutClient({ apiKey: "YOUR_API_KEY" });Environment Variables
For security, store API keys in environment variables rather than hardcoding:
export SCOUT_API_KEY="your-api-key-here"import os
from scoutos import Scout
client = Scout(api_key=os.environ.get("SCOUT_API_KEY"))import { ScoutClient } from "scoutos";
const client = new ScoutClient({
apiKey: process.env.SCOUT_API_KEY
});Managing Keys
Enable or Disable a Key
Temporarily disable a key without deleting it:
- Go to Settings → API Keys
- Find your key and toggle the Enabled switch
Disabled keys return 401 Unauthorized for all requests. Use this for:
- Suspending access during security events
- Testing key configurations
- Gradual key rotation
Key Rotation
Rotate keys regularly for security:
- Create a new key
- Update your applications to use the new key
- Verify all services work correctly
- Disable or delete the old key
With multiple keys per organization, you can run old and new keys simultaneously during transition periods.
Deleting Keys
Warning: Deletion is permanent. Any systems using that key will immediately lose access.
To delete:
- Navigate to Settings → API Keys
- Click Delete on the key
- Confirm the deletion
Best Practices
Naming Conventions
Use descriptive names that identify the key’s purpose:
- ✅
production-api-server - ✅
github-actions-ci - ✅
internal-microservice - ❌
key1 - ❌
test
Multi-Key Strategy
Organizations benefit from multiple keys:
| Key Name | Purpose | Environment |
|---|---|---|
prod-main | Production services | Production |
prod-cicd | CI/CD pipelines | Production |
staging | Testing environment | Staging |
dev-team | Development team | Development |
This approach enables:
- Independent key rotation per service
- Revoking access for specific services without affecting others
- Audit trail per key usage
Coming Soon
Org Credentials are designed for extensibility. Upcoming features include:
- Scoped Permissions — RBAC-based access control for different services
- Audit Trail — Detailed logs of key usage and changes
Troubleshooting
| Error | Solution |
|---|---|
401 Unauthorized | Verify key is enabled and correctly copied |
403 Forbidden | Key lacks permissions for this operation |
| Key not appearing | Refresh the page; check organization membership |
Migrating from Legacy Keys
If you have existing Legacy Keys:
- Create new Org Credentials for each use case
- Update your applications to use the new keys
- Verify everything works
- Disable or delete Legacy Keys when ready
Legacy Keys will continue to work indefinitely. Migrate at your own pace—we’ll provide advance notice before any deprecation timeline.
Next Steps
- Drive API Reference — Use API keys with Drive endpoints
- Skills Overview — Configure skills with API keys
- Agent Code Execution — Secure API calls from agent code
Built with ❤️ by Scout OS