# Unable to trigger github or gitlab webhook using curl or postman

**URL:** <https://forum.ansible.com/t/unable-to-trigger-github-or-gitlab-webhook-using-curl-or-postman/38443>\
**Category:** AWX Project\
**Tags:** rhel, awx\
**Created:** [September 15, 2023, 8:13pm UTC](https://forum.ansible.com/t/unable-to-trigger-github-or-gitlab-webhook-using-curl-or-postman/38443 "2023-09-15T20:13:06Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![AWX\_Project2](https://avatars.discourse-cdn.com/v4/letter/a/858c86/32.png) [@AWX\_Project2](https://forum.ansible.com/u/AWX_Project2)\
**Post date:** [September 15, 2023, 8:13pm UTC](https://forum.ansible.com/t/unable-to-trigger-github-or-gitlab-webhook-using-curl-or-postman/38443/1 "2023-09-15T20:13:06Z")

</div>

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/](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](http://cl3-sbx-rhel-elr-hazelcast1.kbc.com)”  
}  
}’

Kindly please help! Thanks in advance! Ahmed

---

<div class="post-metadata">

**Author:** ![golakiyaalice](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/golakiyaalice/32/1046_2.png) [@golakiyaalice](https://forum.ansible.com/u/golakiyaalice)\
**Post date:** [September 19, 2023, 5:13am UTC](https://forum.ansible.com/t/unable-to-trigger-github-or-gitlab-webhook-using-curl-or-postman/38443/2 "2023-09-19T05:13:46Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![AWX\_Project2](https://avatars.discourse-cdn.com/v4/letter/a/858c86/32.png) [@AWX\_Project2](https://forum.ansible.com/u/AWX_Project2)\
**Post date:** [September 19, 2023, 3:54pm UTC](https://forum.ansible.com/t/unable-to-trigger-github-or-gitlab-webhook-using-curl-or-postman/38443/3 "2023-09-19T15:54:52Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![golakiyaalice](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/golakiyaalice/32/1046_2.png) [@golakiyaalice](https://forum.ansible.com/u/golakiyaalice)\
**Post date:** [October 3, 2023, 6:08am UTC](https://forum.ansible.com/t/unable-to-trigger-github-or-gitlab-webhook-using-curl-or-postman/38443/4 "2023-10-03T06:08:22Z")

</div>

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.
