# How can i specify HTTPBasicAuth Authentication in AWX Webhook Notifications

**URL:** <https://forum.ansible.com/t/how-can-i-specify-httpbasicauth-authentication-in-awx-webhook-notifications/29270>\
**Category:** AWX Project\
**Tags:** awx\
**Created:** [December 15, 2018, 12:31pm UTC](https://forum.ansible.com/t/how-can-i-specify-httpbasicauth-authentication-in-awx-webhook-notifications/29270 "2018-12-15T12:31:33Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ankit2](https://avatars.discourse-cdn.com/v4/letter/a/ea5d25/32.png) [@Ankit2](https://forum.ansible.com/u/Ankit2)\
**Post date:** [December 15, 2018, 12:31pm UTC](https://forum.ansible.com/t/how-can-i-specify-httpbasicauth-authentication-in-awx-webhook-notifications/29270/1 "2018-12-15T12:31:33Z")

</div>

I am trying to send Webhook Notifications about the job completion from AWX to MS Teams. I am able to do this using Python **requests** by specifying required credentials (username, password) as **HTTPBasicAuth** values.

How can i specify the Authentication value in the AWX Webhook Notification headers or translate the credentials into the required format?

 ![notification.png](https://us1.discourse-cdn.com/ansible/original/2X/d/d6ede75336f8fef2a852d28e5dc38be15cf98e0f.png)

---

<div class="post-metadata">

**Author:** ![jowestco](https://avatars.discourse-cdn.com/v4/letter/j/85f322/32.png) [@jowestco](https://forum.ansible.com/u/jowestco)\
**Post date:** [December 15, 2018, 1:25pm UTC](https://forum.ansible.com/t/how-can-i-specify-httpbasicauth-authentication-in-awx-webhook-notifications/29270/2 "2018-12-15T13:25:08Z")

</div>

If teams is doing basic auth you can construct the authorization header yourself and pass it in. The basic auth header would look like:  
Authorization: Basic   
Where the encoded cred is a base64 encoding of “username:password”. There are some online tools for doing this or, if you have working python code with requests, you should be able to have requests dump out the encoded header for you.

-John

---

<div class="post-metadata">

**Author:** ![Ankit2](https://avatars.discourse-cdn.com/v4/letter/a/ea5d25/32.png) [@Ankit2](https://forum.ansible.com/u/Ankit2)\
**Post date:** [December 15, 2018, 2:23pm UTC](https://forum.ansible.com/t/how-can-i-specify-httpbasicauth-authentication-in-awx-webhook-notifications/29270/3 "2018-12-15T14:23:13Z")

</div>

Thanks,

I tried this but i keep getting error when i test the notification.

I am using this for HTML Headers section:

**{**  
**“text”: “This is a test Notification from Ansible Tower!”,**  
**“Authorization”: “Basic YW5rasdasddffw==”,**  
**“title”: “Ansible Tower Notification”**  
**}**

This works when i test this using Python script and Postman but fails when using through AWX/Tower.
