Missed Team ’24? Catch up on announcements here.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Hooks 401 Unauthorized for POST, but 200 OK for GET (Oauth)

vital101
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 9, 2019

I'm attempting to create a hook in a repository but I keep getting 401 Unauthorized errors. The odd thing is that if I attempt to simple GET on the hooks endpoint it returns 200 and list the of hooks.

My first suspicion was that I didn't have the proper scopes enabled, but that would have returned a 403 I think? I also double-checked to make sure I had the "Webhooks" scope checked in my oauth application. I even tried re-authenticating.

I'm authenticating via Oauth in both cases. My request POST body looks like:

{ description: 'Kernl.us Webhook', url: 'https://kernl.us/api/v1/webhooks/bitbucket', active: true, events: ['repo:push'] }

 Any ideas?

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events