🛠️ Documentation API
Intégrez OverSong dans vos projets grâce à notre API publique.
Authentification
Toutes les requêtes doivent inclure votre clé API via ?api_key= ou le header X-Api-Key.
Query parameter
GET https://oversong.ssp.en.gp/api/v1/now-playing?api_key=os_live_your_api_key_here
HTTP Header
GET https://oversong.ssp.en.gp/api/v1/now-playing
X-Api-Key: os_live_your_api_key_here
GET
/api/v1/now-playing
Musique en cours
200 OK — Playing
{
"success": true,
"data": {
"is_playing": true,
"progress_ms": 45000,
"progress_percent": 34.5,
"time_remaining_ms": 157000,
"track": { "id": "...", "name": "Never Gonna Give You Up", "duration_ms": 213573, "explicit": false },
"artist_name": "Rick Astley",
"album": { "name": "Whenever You Need Somebody", "images": [{"url":"https://..."}] },
"device": { "name": "My PC", "type": "Computer", "volume": 80 }
},
"meta": { "user": "SannaStudio", "timestamp": 1710892800 }
}
200 OK — Nothing playing
{ "success": true, "data": null }
401 — Invalid key
{ "success": false, "error": "Invalid API key" }
GET
/api/v1/user
Returns basic info about the user linked to the API key.
200 OK
{
"success": true,
"data": {
"username": "SannaStudio",
"spotify_connected": true,
"spotify_display_name": "Sanna",
"spotify_product": "premium",
"created_at": "2025-01-15 14:30:00"
}
}
⚡ Limites de taux
Ne pas appeler l'API plus d'une fois toutes les 5 secondes.
🎥 OBS Widget
Widget URL
https://oversong.ssp.en.gp/fr/widget/{your_token}
| OBS Setting | Value |
|---|---|
| Width | 500 |
| Height | 120 |
| Custom CSS | body { background: transparent !important; } |