Référence REST
REST · Amis et appels
Demandes d’ami, blocages, amis en commun, historique et état des appels.
Amis — /api/friends
Les routes …/request/… (singulier) sont historiques ; …/requests/… (pluriel) est la forme utilisée par le temps réel. Elles font la même chose.
Appels — /api/calls
Ces routes ne portent que l’état d’un appel. La signalisation et le média passent par le temps réel : voir Appels et vocal.
Historique des appels d'un utilisateur.
GET https://gateway.alfychat.app/api/calls/history/{userId}
Erreurs
- 403Accès non autorisé
Succès : 200
curl -X GET "https://gateway.alfychat.app/api/calls/history/<userId>" \
-H "Authorization: Bearer $ACCESS_TOKEN"Nombre maximal de participants d'un appel de serveur.
GET https://gateway.alfychat.app/api/calls/limits/{serverId}
Succès : 200
curl -X GET "https://gateway.alfychat.app/api/calls/limits/<serverId>" \
-H "Authorization: Bearer $ACCESS_TOKEN"Crée un appel en message privé.
POST https://gateway.alfychat.app/api/calls/dm
Erreurs
- 400type doit être 'voice' ou 'video'
- 401Authentification requise
- 403Accès non autorisé à cette conversation
Succès : 201
curl -X POST "https://gateway.alfychat.app/api/calls/dm" \
-H "Authorization: Bearer $ACCESS_TOKEN"Crée un appel dans un groupe.
POST https://gateway.alfychat.app/api/calls/group
Erreurs
- 400channelId requis et authentification nécessaire
- 403Accès non autorisé à ce groupe
Succès : 201
curl -X POST "https://gateway.alfychat.app/api/calls/group" \
-H "Authorization: Bearer $ACCESS_TOKEN"Crée un appel dans un salon vocal de serveur (409 si un appel est déjà actif).
POST https://gateway.alfychat.app/api/calls/server
Erreurs
- 400channelId et serverId requis
- 403Ce salon n'appartient pas à ce serveur
- 403Vous n'êtes pas membre de ce serveur
Succès : 201, 409
curl -X POST "https://gateway.alfychat.app/api/calls/server" \
-H "Authorization: Bearer $ACCESS_TOKEN"Crée un appel (message privé, route historique).
POST https://gateway.alfychat.app/api/calls
Erreurs
- 400type doit être 'voice' ou 'video'
- 401Authentification requise
- 403Accès non autorisé à cette conversation
Succès : 201
curl -X POST "https://gateway.alfychat.app/api/calls" \
-H "Authorization: Bearer $ACCESS_TOKEN"État d'un appel (statut, participants, catégorie).
GET https://gateway.alfychat.app/api/calls/{callId}
Erreurs
- 403Accès non autorisé
- 404Appel non trouvé
Succès : 200
curl -X GET "https://gateway.alfychat.app/api/calls/<callId>" \
-H "Authorization: Bearer $ACCESS_TOKEN"Palier de qualité courant de l'appel.
GET https://gateway.alfychat.app/api/calls/{callId}/quality
Erreurs
- 403Accès non autorisé
- 404Appel non trouvé
Succès : 200
curl -X GET "https://gateway.alfychat.app/api/calls/<callId>/quality" \
-H "Authorization: Bearer $ACCESS_TOKEN"Met à jour le palier de qualité (appel interne du media-server).
POST https://gateway.alfychat.app/api/calls/{callId}/quality
Erreurs
- 401Accès interne requis
curl -X POST "https://gateway.alfychat.app/api/calls/<callId>/quality"Rejoint un appel.
POST https://gateway.alfychat.app/api/calls/{callId}/join
Erreurs
- 401Authentification requise
- 403Accès non autorisé à cet appel
- 404Appel non trouvé ou terminé
Succès : 200, 403
curl -X POST "https://gateway.alfychat.app/api/calls/<callId>/join" \
-H "Authorization: Bearer $ACCESS_TOKEN"Refuse un appel entrant.
POST https://gateway.alfychat.app/api/calls/{callId}/reject
Erreurs
- 401Authentification requise
- 403Accès non autorisé
- 404Appel non trouvé
Succès : 200
curl -X POST "https://gateway.alfychat.app/api/calls/<callId>/reject" \
-H "Authorization: Bearer $ACCESS_TOKEN"Quitte un appel.
POST https://gateway.alfychat.app/api/calls/{callId}/leave
Erreurs
- 401Authentification requise
Succès : 200
curl -X POST "https://gateway.alfychat.app/api/calls/<callId>/leave" \
-H "Authorization: Bearer $ACCESS_TOKEN"Termine un appel.
POST https://gateway.alfychat.app/api/calls/{callId}/end
Erreurs
- 401Authentification requise
- 403Non autorisé à terminer cet appel
Succès : 200
curl -X POST "https://gateway.alfychat.app/api/calls/<callId>/end" \
-H "Authorization: Bearer $ACCESS_TOKEN"