Add authentication with OAuth2

PATCH /reservation/api/1/platform/{platform-code}/webhook/auth/oauth2

Activate OAuth2 authentication for webhooks.

Path parameters

  • platform-code string Required

    The unique code assigned to the reservation platform.

    Maximum length is 11. Format should match the following pattern: [a-zA-Z0-9_-]+.

application/json

Body

Responses

  • Accepted

  • Non relevant request

  • Scope 'reservation-{platform-code}' not found in the token

  • Platform not found

PATCH /reservation/api/1/platform/{platform-code}/webhook/auth/oauth2
curl \
 -X PATCH https://api.lsk.lightspeed.app/reservation/api/1/platform/MyPlatform/webhook/auth/oauth2 \
 -H "Authorization: Bearer $ACCESS_TOKEN" \
 -H "Content-Type: application/json" \
 -d '{"clientId":"LightspeedKSeries","clientSecret":"Example-Client-Secret","clientName":"LightspeedKSeries","clientAuthorizationMethod":"CLIENT_SECRET_BASIC","authorizationGrantType":"CLIENT_CREDENTIALS","scopes":["webhooks-api"],"providerTokenUri":"https://my.platform/emitter/token","providerJwkSetUri":"https://my.platform/public-keys"}'
Request examples
{
  "clientId": "LightspeedKSeries",
  "clientSecret": "Example-Client-Secret",
  "clientName": "LightspeedKSeries",
  "clientAuthorizationMethod": "CLIENT_SECRET_BASIC",
  "authorizationGrantType": "CLIENT_CREDENTIALS",
  "scopes": [
    "webhooks-api"
  ],
  "providerTokenUri": "https://my.platform/emitter/token",
  "providerJwkSetUri": "https://my.platform/public-keys"
}