| title | Authentication |
|---|---|
| description | Learn how to authenticate your API requests using API keys and manage your credits |
The Mr. Doge API uses API keys with Bearer token authentication to secure access to endpoints. Every request must include your API key in the Authorization header, and credits are automatically deducted based on the endpoint you're calling.
No complicated OAuth flows or session management. Just include your API key in each request header and you're good to go!All Mr. Doge API keys follow this format:
sk_live_followed_by_64_hexadecimal_characters
Example:
sk_live_a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6q7r8s9t0u1v2w3x4y5z6a7b8c9d0e1f2
Include your API key in the Authorization header with the Bearer scheme:
const response = await fetch("https://api.mrdoge.co/v2/matches?locale=en", {
headers: {
Authorization: "Bearer sk_live_your_api_key_here",
},
});import requests
headers = {'Authorization': 'Bearer sk_live_your_api_key_here'}
response = requests.get('https://api.mrdoge.co/v2/matches?locale=en', headers=headers)<?php
$ch = curl_init('https://api.mrdoge.co/v2/matches?locale=en');
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Authorization: Bearer sk_live_your_api_key_here'
]);
$response = curl_exec($ch);
?>In the dashboard, you can see:
- Key Name - The label you assigned
- Key Preview - Last 12 characters (e.g.,
sk_live_...d0e1f2) - Created Date - When the key was generated
- Last Used - Most recent API request timestamp
- Status - Active or Inactive
If a key is compromised or no longer needed:
- Go to Dashboard → API Keys
- Find the key you want to deactivate
- Click Deactivate (or Delete icon)
- Confirm the action
For security, rotate your API keys periodically:
- Create a new API key with a descriptive name (e.g.,
Production App v2) - Update your application to use the new key
- Test thoroughly to ensure everything works
- Deactivate the old key after confirming the new one is working
- Monitor usage in the dashboard to verify the switch
The Mr. Doge API uses a credit-based pay-as-you-go model instead of traditional rate limits.
- Purchase credits in packages
- Make API requests - credits are automatically deducted
- Monitor usage via response headers and dashboard
- Auto-recharge (optional) when balance runs low
Most endpoints cost 1 credit per request. Some specialized endpoints cost more:
| Endpoint Category | Cost per Request |
|---|---|
| No-cost endpoints (regions, competitions, health) | 0 credits (free) |
Standard matches endpoint (/v2/matches) |
1 credit |
Trending matches endpoint (/v2/matches/trending) |
2 credits |
Specific match endpoint (/v2/matches/{matchId}) |
1 credit |
Match settlement (/v2/bets/events/{eventId}/settle-bet) |
1 credit |
Live odds (/v2/matches/{matchId}/live-odds) |
2 credits |
AI recommendations (/v2/ai/betting-recommendations) |
2 credits |
AI predictions (/v2/ai/mrdoge-picks) |
3 credits |
Store API keys in environment variables, never hardcode them:
```javascript .env File # .env MRDOGE_API_KEY=sk_live_your_api_key_here ```require("dotenv").config();
const apiKey = process.env.MRDOGE_API_KEY;
fetch("https://api.mrdoge.co/v2/matches?locale=en", {
headers: { Authorization: `Bearer ${apiKey}` },
});import os
from dotenv import load_dotenv
load_dotenv()
api_key = os.getenv('MRDOGE_API_KEY')
headers = {'Authorization': f'Bearer {api_key}'}Instead:
- Create a backend proxy that makes API calls on behalf of your frontend
- Use serverless functions (Vercel, Netlify, AWS Lambda) to keep keys secure
- Implement user authentication in your app, then make API calls server-side
Example Architecture:
Frontend (React/Vue/etc.)
↓ HTTP request (no API key)
Backend API (Node.js/Python/PHP)
↓ HTTP request (with API key in server)
Mr. Doge API
The stolen key will stop working immediately. Monitor your usage for any suspicious activity.
However, we recommend rotating keys every 90 days for security best practices.
<Card title="Setup Auto-Recharge" icon="arrows-rotate" href="/credits/pricing#auto-recharge"
Never run out of credits with automatic top-ups
Master API key management in the dashboard