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?