When registering a webhook using the REST API getting the below error.
Client must be authenticated to access this resource
For registering a webhook iam making a POST request to the below URL.
https://mysite.atlassian.net/rest/api/3/webhook
and passing the header with Authorization as
Basic ${Buffer.from('email@example.com:<api_token>').toString('base64')}
I have also tried the other API route
https://api.atlassian.com/ex/jira/{cloudId}/rest/api/2/webhook
and i still receive the same error.