Getting Started
Integrate the Bassode API into your application in a few steps.
Step 1: Create a Bassode Account
- Visit bassode.com/account/register
- Verify your email address
- Sign in to your account
Step 2: Activate a Subscription
Creating and managing API keys requires an active subscription. You can start with a free trial.
- Go to Account → Subscription
- Choose a plan (Monthly, Yearly, or Lifetime)
- Activate your subscription or start a trial
Step 3: Generate an API Key
- Go to Account → API Keys
- Click "Create New API Key"
- Give your key a descriptive name
- Select the scopes your application needs
- Save both the API Key and API Secret securely — the secret is shown only once
Important: Your API Secret cannot be retrieved after creation. If you lose it, revoke the key and generate a new one.
Step 4: Query the Audio Catalog
With a key that has the read:devices scope you can query the audio device catalog immediately — no user login needed:
cURL
curl https://api.bassode.com/api/Dac \
-H "X-Api-Key: bsk_live_xxxxxxxxxxxxxx" \
-H "X-Api-Secret: your_secret_here"
C#
var client = new HttpClient();
client.DefaultRequestHeaders.Add("X-Api-Key", "bsk_live_xxxxxxxxxxxxxx");
client.DefaultRequestHeaders.Add("X-Api-Secret", "your_secret_here");
var response = await client.GetAsync("https://api.bassode.com/api/Dac");
var content = await response.Content.ReadAsStringAsync();
JavaScript
const response = await fetch('https://api.bassode.com/api/Dac', {
headers: {
'X-Api-Key': 'bsk_live_xxxxxxxxxxxxxx',
'X-Api-Secret': 'your_secret_here'
}
});
const data = await response.json();
Step 5: Authenticate a User (Optional)
If your application needs user-specific data (API key management, registered devices), authenticate the user first to obtain a JWT:
cURL
curl -X POST https://api.bassode.com/api/Users/Login \
-H "X-Api-Key: bsk_live_xxxxxxxxxxxxxx" \
-H "X-Api-Secret: your_secret_here" \
-H "Content-Type: application/json" \
-d '{"email":"user@example.com","password":"password"}'
Use the returned token as a Bearer token in subsequent requests:
curl https://api.bassode.com/api/ApiKeys \
-H "X-Api-Key: bsk_live_xxxxxxxxxxxxxx" \
-H "X-Api-Secret: your_secret_here" \
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
Error Handling
Always check the HTTP status code:
| Status | Meaning |
|---|---|
200 | Success |
400 | Bad request — check request body and parameters |
401 | Missing or invalid API key / secret |
403 | Insufficient scope, or insufficient JWT role |
404 | Resource not found |
429 | Rate limit exceeded — retry after the indicated delay |
500 | Server error |
Best Practices
- Store credentials in environment variables — never hardcode API keys or secrets
- Store JWTs securely — do not expose them to the browser or log them
- Request minimum scopes — only assign the scopes your application needs
- Handle 403 gracefully — a trial may have expired mid-session; prompt the user to re-login or subscribe
- HTTPS only — all requests must use HTTPS