I want to create Webhooks with Personal access tok...
# pact-broker
y
I want to create Webhooks with Personal access token of Azure DevOps since the user credentials usage is disabled. I couldn't find any documentation that can help me on this in the pact docs. Please someone suggest
m
I assume the token would just go in the usual Authorisation header?
a
I've been using AzDo REST API through the basic HTTP auth with a blank username but the API key as the password in the past. Can't remember was it documented somewhere in AzDo, but it has been working for me. Example from one project:
Copy code
const config = {
  auth: {
    username: '', // Has to exist, but not used with an API key
    password: process.env.AZURE_API_KEY,
  },
};
...
await <http://axios.post|axios.post>(url, azure.payload, config)
I have a small intermediate Function App service standing between Pactflow webhooks & Azure pipelines that relays the requests and does some additional magic where this same method is being used.
👍 1
👍🏼 1