Authentication
All API requests require authentication via an API key. Keys are scoped to your account and carry the permissions of your current plan.
Getting an API Key
- Sign up or log in at shobdo.me.
- Navigate to the Console.
- Click Generate New Key. Your key will be displayed once — copy and store it securely.
Using Your API Key
Include your API key in the Authorization header of every request using the Bearer scheme:
Authorization: Bearer YOUR_API_KEY
cURL
curl -H "Authorization: Bearer shobdo_sk_abc123..." \
"https://api.shobdo.me/api/v1/search?q=hello"JavaScript (fetch)
const response = await fetch(
"https://api.shobdo.me/api/v1/search?q=hello",
{
headers: {
Authorization: "Bearer shobdo_sk_abc123...",
},
}
);
const data = await response.json();
console.log(data);Python (requests)
import requests
response = requests.get(
"https://api.shobdo.me/api/v1/search",
params={"q": "hello"},
headers={"Authorization": "Bearer shobdo_sk_abc123..."},
)
print(response.json())Security Best Practices
Error Responses
If authentication fails, the API returns one of the following:
| Status | Error | Cause |
|---|---|---|
401 | Missing or invalid Authorization header | No Authorization header or missing Bearer prefix |
401 | Invalid or revoked API key | The API key does not exist or has been revoked |
403 | Account invalid, deleted, or suspended | The account associated with the key has been deactivated |