Aller au contenu

Galaxie Artibox

Serveur OAuth · Référence de l'API

Échanger un code, rafraîchir, révoquer et inspecter les jetons d'une application OAuth.

Échanger un code ou un jeton de rafraîchissement

POST/oauth/token

https://www.artibox-calendar.com/api/webhooks

Portée : — Aucune : l'application s'identifie par client_id et client_secret

`grant_type=authorization_code` (`code` valable 10 minutes, une fois ; `redirect_uri` ; `code_verifier` PKCE S256) ou `grant_type=refresh_token` (le jeton de rafraîchissement est remplacé à chaque usage ; un ancien réutilisé coupe l'accès).

Corps de la requête

Exemple de requête
curl -X POST 'https://www.artibox-calendar.com/api/webhooks/oauth/token' \
  -H 'Content-Type: application/json' \
  -d '{"grant_type":"authorization_code","code":"rdv_code_…","redirect_uri":"https://example.com/oauth/retour","code_verifier":"…","client_id":"rdv_app_…","client_secret":"rdv_cs_…"}'
Exemple de réponse
{
  "access_token": "rdv_oat_…",
  "token_type": "Bearer",
  "expires_in": 7200,
  "refresh_token": "rdv_ort_…",
  "scope": "types:lire reservations:lire"
}

Réponses

  • 200 Réussi
  • 400 Réponse
  • 404 Introuvable (ou d'une autre organisation)

Révoquer un jeton (RFC 7009)

POST/oauth/revoke

https://www.artibox-calendar.com/api/webhooks

Portée : — Aucune : l'application s'identifie par client_id et client_secret

Un jeton d'accès ou de rafraîchissement de l'application.

Corps de la requête

Exemple de requête
curl -X POST 'https://www.artibox-calendar.com/api/webhooks/oauth/revoke' \
  -H 'Content-Type: application/json' \
  -d '{"token":"rdv_ort_…","client_id":"rdv_app_…","client_secret":"rdv_cs_…"}'
Exemple de réponse
[]

Réponses

  • 200 Réussi
  • 400 Réponse
  • 404 Introuvable (ou d'une autre organisation)

Inspecter un jeton (RFC 7662)

POST/oauth/introspect

https://www.artibox-calendar.com/api/webhooks

Portée : — Aucune : l'application s'identifie par client_id et client_secret

`{"active": false}` pour un jeton inconnu, expiré, retiré ou d'une autre application.

Corps de la requête

Exemple de requête
curl -X POST 'https://www.artibox-calendar.com/api/webhooks/oauth/introspect' \
  -H 'Content-Type: application/json' \
  -d '{"token":"rdv_oat_…","client_id":"rdv_app_…","client_secret":"rdv_cs_…"}'
Exemple de réponse
{
  "active": true,
  "scope": "types:lire",
  "client_id": "rdv_app_…",
  "token_type": "access_token",
  "exp": 1764583200,
  "iat": 1764576000,
  "sub": "0192f0c4-0000-7000-8000-000000000001",
  "username": "lea.bernard@example.com",
  "organization_id": "0192f0a0-0000-7000-8000-0000000000aa"
}

Réponses

  • 200 Réussi
  • 400 Réponse
  • 404 Introuvable (ou d'une autre organisation)