hey folks:wave: I am trying to create webhook usin...
# pact-broker
v
hey folks👋 I am trying to create webhook using pact_broker-client gem (our pact broker is pactflow broker). I keep getting this error even though I use the same credentials I use in the frontend to create webhook successfully
Error creating webhook. response status=403 body=Forbidden. Either you are using a read only token for a request that requires a write token (the most likely cause), or you do not have the required permissions.
this is command I am executing. Any idea why the error? thankyou
Copy code
pact-broker create-webhook <https://api.buildkite.com/v2/organizations/><org-name>/pipelines/<slug>/builds \
  --header "Authorization: Bearer <token>" \
  --request POST \
  --consumer <consumer> \
  --provider <provider> \
  --broker-base-url <pactflow-url> \
  --broker-token <admin user's token> \
  --data '{
    "branch": "branch",
    "commit": "HEAD",
    "message": "sample Consumer -> sample Provider",
    "env": {
      "PACT_URL": "${pactbroker.pactUrl}",
    }
  }' \
  --contract-content-changed \
  --team-uuid <uuid>
Looks like token with User access doesnt have access to create Webhook even though UI says webhook management is allowed User role. When I change the role to admin I got POST success message. But still in the pactflow frontend, i cant see the new webhook entry