Unable to trigger github or gitlab webhook using curl or postman

Hi Team,

I have created a github webhook on a template but I’m unable to trigger it using curl or postman. Error I’m seeing is: You do not have permission to perform this action. Please help!
My AWX version is 21.12.0

I have enabled run templates for the team, then with below command still I’m seeing same error: you do not have permission to perform this action
curl -k -X POST https://awx.kbc.com/api/v2/job_templates/271/gitlab/ -H “Content-Type: application/json” -H “Authorization: Bearer 5SsqJrcAW9iRh2CkzQejqEuHq5CuKU7vEjMdaDgU2MBd2PB7IP” -d '{

“result”: {
“vmname”: “cl3-sbx-rhel-elr-hazelcast1.kbc.com
}
}’

Kindly please help! Thanks in advance! Ahmed

Seems the token created for the user does not have enough privilege to trigger the POST.
Please check the permissions or regenerate the token with enough permissions.

Thanks,
Alice

Hi Alice,

I have regenerated token with enough permissions but no luck :(. Same error has been persisting.

So, I’m wondering if my use case is correct? i.e., Can webhook be triggered by any other means other than from Github/Gitlab?

Best wishes & Regards,
Ahmed

If you want to trigger AWX jobs from github/gitlab webhooks , curl should be good enough.
Also ,if you want to trigger webhooks post job-execution,Please configure notifications in awx and associate it with template.