Intégrez musique, podcasts, radio et événements africains dans vos applications. API REST simple, JSON, Bearer token.
https://api.waiichia.com
POST /api/auth/login avec email + mot de passe → reçoit un token JWT.
Stockez le token. Il est valide 30 jours. Chaque requête protégée doit l'inclure.
Ajoutez Authorization: Bearer <token> à vos requêtes.
POST https://api.waiichia.com/api/auth/login Content-Type: application/json { "email": "user@example.com", "password": "motdepasse" } // Réponse : { "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...", "user": { "id": "uuid", "username": "artiste", ... } }
// 1. Connexion const res = await fetch('https://api.waiichia.com/api/auth/login', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ email: '…', password: '…' }) }) const { token } = await res.json() // 2. Récupérer les sons tendance const tracks = await fetch('https://api.waiichia.com/api/tracks/trending', { headers: { 'Authorization': `Bearer ${token}` } }).then(r => r.json()) console.log(tracks.tracks) // Array de sons
import requests BASE = "https://api.waiichia.com" # Connexion r = requests.post(f"{BASE}/api/auth/login", json={"email": "…", "password": "…"}) token = r.json()["token"] # Sons tendance headers = {"Authorization": f"Bearer {token}"} tracks = requests.get(f"{BASE}/api/tracks/trending", headers=headers) print(tracks.json()["tracks"])
# Méthodes de paiement (public) curl https://api.waiichia.com/api/payments/methods # Sons tendance curl -H "Authorization: Bearer <token>" \ https://api.waiichia.com/api/tracks/trending # Taux de change curl "https://api.waiichia.com/api/currency/convert?amount=10000&from=KMF&to=EUR"