Logo Mekago

Référence API & M2M

Intégrez Mekago à votre système via l'API JSON-RPC 2.0.

Démarrage rapide

L'API Mekago utilise le protocole JSON-RPC 2.0 sur HTTP avec authentification OAuth 2.0.

Obtenir vos identifiants

Pour obtenir vos client_id et client_secret, utilisez le tool MCP api-key-create depuis Claude Desktop avec un compte garagiste ou administrateur. Une page web de gestion des clés API arrivera prochainement.

  1. Connectez-vous à Claude Desktop avec votre compte garagiste ou admin
  2. Demandez : « Crée une clé API pour mon DMS »
  3. Copiez le client_secret affiché — il ne sera plus visible après

Authentification

Échangez vos identifiants contre un token d'accès (durée de vie : 900 secondes, pas de refresh token) :

curl -X POST https://www.mekago.fr/mcp/oauth/token \
  -H "Content-Type: application/x-www-form-urlencoded" \
  -d "grant_type=client_credentials" \
  -d "client_id=YOUR_CLIENT_ID" \
  -d "client_secret=YOUR_CLIENT_SECRET"

Appeler l'API

Utilisez le token pour envoyer des requêtes JSON-RPC 2.0 :

curl -X POST https://www.mekago.fr/mcp \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "method": "tools/call",
    "params": {
      "name": "customer-vehicles-list",
      "arguments": {}
    },
    "id": 1
  }'