Pages annexes, exemples et details techniques dans une mise en page plus lisible.
mkdir -p militant-api-install
cd militant-api-install
curl -fsSLO https://gitlab.com/militant1/api-installer/-/raw/main/militant-api
chmod +x militant-api
./militant-api
curl http://localhost:9082/v1/index.php
curl -X POST http://localhost:9082/v1/auth.php \
-H "Content-Type: application/json" \
-d '{"username":"ton_username","password":"ton_password"}'
curl http://localhost:9082/v1/posts.php \
-H "Authorization: Bearer TON_TOKEN"
Configurer LIVEKIT_URL, LIVEKIT_API_KEY, LIVEKIT_API_SECRET (env ou config/livekit.local.php via /admin/livekit.php). Tester un token :
curl -X POST "http://localhost:9082/v1/lives.php?path=token" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer TON_TOKEN" \
-d '{"roomName":"test","identity":"user-1","name":"Test","canPublish":false}'
L’UI /admin/livekit.php (saisie des secrets LiveKit) est réservée aux techniciens : même règle que Millitant (users.is_admin = 1, onglet Techniciens dans admin.php).
Configurer WEBRTC_TURN_URLS, WEBRTC_TURN_AUTH_SECRET, WEBRTC_TURN_TTL, WEBRTC_TURN_REALM (env ou config/turn.local.php via /admin/turn.php).
/v1/settings.php renvoie ensuite stun_servers, turn_servers et webrtc_ice_servers. Si WEBRTC_TURN_AUTH_SECRET est present, l’API genere des credentials TURN temporaires HMAC compatibles coturn use-auth-secret.
./militant-api update
./militant-api uninstall
Plus de details : README.md et DOCKER.md