All Glyde API requests must be authenticated using Bearer tokens. This ensures that only authorized applications can access your account and perform transactions.
API Keys
Glyde provides different types of API keys for different purposes:
| Key Type | Prefix | Purpose |
|---|
| Live Secret Key | sk_live_ | Production transactions with real money |
| Sandbox Secret Key | sk_sandbox_ | Testing without processing real transactions |
| Public Key | pk_ | Client-side operations with limited access |
Secret keys grant full access to your account. Never expose them in client-side code, commit them to version control, or share them publicly. Store them securely as environment variables.
Getting Your Keys
- Log in to your dashboard at dashboard.useglyde.co
- Navigate to Settings → API Configuration
- Copy your keys for the appropriate environment
Your dashboard displays both sandbox and live keys. Use sandbox keys during development and switch to live keys only when you’re ready for production.
Making Authenticated Requests
Include your secret key in the Authorization header of every API request:
Authorization: Bearer sk_live_your_secret_key
curl -X GET "https://api.useglyde.co/v1/banks" \
-H "Authorization: Bearer sk_live_your_secret_key"
Authentication Errors
If authentication fails, you’ll receive a 401 Unauthorized response:
{
"status": "failed",
"message": "Unauthenticated"
}
Common causes:
- Missing
Authorization header
- Invalid or expired API key
- Using a sandbox key against the production URL (or vice versa)
- Malformed header (e.g., missing “Bearer” prefix)
Environments
Each environment has its own base URL and requires matching API keys:
| Mode | Base URL | Key Prefix |
|---|
| Sandbox | https://sandbox.useglyde.co/v1 | sk_sandbox_ |
| Production | https://api.useglyde.co/v1 | sk_live_ |
Requests to production with sandbox keys (or vice versa) will fail authentication.
Security Best Practices
- Use environment variables — Store keys in environment variables, not in code
- Rotate keys periodically — Regenerate keys if you suspect they’ve been compromised
- Separate environments — Use different keys for development, staging, and production
- Server-side only — Make API calls from your backend, never from browsers or mobile apps
- Monitor usage — Review your API logs in the dashboard for unusual activity