Aller au contenu principal

Authentification API

L'API B2B utilise une authentification par clé API.

En-tête requis

Chaque requête doit inclure :

X-Api-Key: votre-cle-api

Exemple

curl -X GET "https://api.macartememembre.com/b2b/v1/employe" \
-H "X-Api-Key: votre-cle-api" \
-H "Accept: application/json"

Erreurs d'authentification

401 Unauthorized

La clé API est manquante ou invalide.

{
"type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
"title": "Unauthorized",
"status": 401,
"detail": "Clé API invalide"
}

403 Forbidden

La clé API est valide mais n'a pas accès à cette ressource.

{
"type": "https://tools.ietf.org/html/rfc7231#section-6.5.3",
"title": "Forbidden",
"status": 403,
"detail": "Accès refusé à cette ressource"
}

Obtenir une clé API

Contactez l'équipe MCM pour obtenir votre clé API. Vous devrez fournir :

  • Nom de votre organisation
  • Cas d'utilisation prévu
  • Contact technique
  • Environnement souhaité (production/staging)