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

    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

  • 200

    Accepted

  • 400

    Non relevant request

  • 403

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

  • 404

    Platform not found

PATCH /reservation/api/1/platform/{platform-code}/webhook/auth/oauth2
curl \
 -X PATCH https://api.trial.lsk.lightspeed.app/reservation/api/1/platform/EasyTable/webhook/auth/oauth2 \
 -H "Authorization: Bearer $ACCESS_TOKEN" \
 -H "Content-Type: application/json" \
 -d '{"client_id":"LightspeedKSeries","client_secret":"*****************","client_name":"LightspeedKSeries","client_authorization_method":"CLIENT_SECRET_BASIC","authorization_grant_type":"CLIENT_CREDENTIALS","scopes":["webhooks-api"],"provider_token_uri":"https://table.easy/emitter/token","provider_jwk_set_uri":"https://table.easy/public-keys"}'
Request example
{
  "client_id": "LightspeedKSeries",
  "client_secret": "*****************",
  "client_name": "LightspeedKSeries",
  "client_authorization_method": "CLIENT_SECRET_BASIC",
  "authorization_grant_type": "CLIENT_CREDENTIALS",
  "scopes": [
    "webhooks-api"
  ],
  "provider_token_uri": "https://table.easy/emitter/token",
  "provider_jwk_set_uri": "https://table.easy/public-keys"
}