# Help needed using Custom Credential value in Webhook Notification Header

**URL:** <https://forum.ansible.com/t/help-needed-using-custom-credential-value-in-webhook-notification-header/44518>\
**Category:** Get Help\
**Tags:** credentials\
**Created:** [September 19, 2025, 4:29pm UTC](https://forum.ansible.com/t/help-needed-using-custom-credential-value-in-webhook-notification-header/44518 "2025-09-19T16:29:48Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Narizz28](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/narizz28/32/9476_2.png) [@Narizz28](https://forum.ansible.com/u/Narizz28)\
**Post date:** [September 19, 2025, 4:29pm UTC](https://forum.ansible.com/t/help-needed-using-custom-credential-value-in-webhook-notification-header/44518/1 "2025-09-19T16:29:48Z")

</div>

Hello,  
I am trying to use a value from a Custom Credential Type in a Webhook Notification header, but nothing I am trying works.

Scenario:  
Custom Credential Type = Webhook Keys with the following definition:  
“inputs”: {  
“fields”: [  
{  
“id”: “App\_API\_username”,  
“type”: “string”,  
“label”: “API\_Username”  
},  
{  
“id”: “App\_API\_Key”,  
“type”: “string”,  
“label”: “API\_Key”,  
“secret”: true  
}  
]  
},  
“injectors”: {  
“extra\_vars”: {  
“App\_API\_Key”: “{{ App\_API\_Key }}”,  
“App\_API\_USERNAME”: “{{ App\_API\_username }}”  
}  
}

I have created the following Credential using that custom type:  
“name”: “Dev API Key”  
“inputs”: {  
“App\_API\_Key”: “$encrypted$”,  
“App\_API\_username”: “”  
},

What I am having a hard time figuring out is how to get the App\_API\_Key value for that credential into a Webhook Notification header:

{  
“content-type”: “application/json”,  
“key”: “ **{this is where I need the value from the credential}** ”  
}

Any ideas on how I can accomplish this?

JT

---

<div class="post-metadata">

**Author:** ![dbrennand](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/dbrennand/32/7830_2.png) [@dbrennand](https://forum.ansible.com/u/dbrennand)\
**Post date:** [September 19, 2025, 4:41pm UTC](https://forum.ansible.com/t/help-needed-using-custom-credential-value-in-webhook-notification-header/44518/2 "2025-09-19T16:41:04Z")

</div>

If I’m understanding what you’ve said correctly. It would be `App_API_Key`.

Assuming in AWX you have your Job Template and you’ve created a Credential from the custom Credential Type and associated it with the Job Template, in your playbook:

```yaml
---
- hosts: localhost
  tasks:
    - ansible.builtin.uri:
      url: https://some-webhook-service.example.tld
      headers:
        key: "{{ App_API_Key }}"

```

---

<div class="post-metadata">

**Author:** ![Narizz28](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/narizz28/32/9476_2.png) [@Narizz28](https://forum.ansible.com/u/Narizz28)\
**Post date:** [September 19, 2025, 5:11pm UTC](https://forum.ansible.com/t/help-needed-using-custom-credential-value-in-webhook-notification-header/44518/3 "2025-09-19T17:11:20Z")

</div>

I need it in a Webhook Notification header, not in a playbook.

 ![image](https://us1.discourse-cdn.com/ansible/original/2X/4/42814c255275a4b25e9e6bb2eb395c59db94696e.png)

---

<div class="post-metadata">

**Author:** ![Narizz28](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/narizz28/32/9476_2.png) [@Narizz28](https://forum.ansible.com/u/Narizz28)\
**Post date:** [September 19, 2025, 5:28pm UTC](https://forum.ansible.com/t/help-needed-using-custom-credential-value-in-webhook-notification-header/44518/4 "2025-09-19T17:28:21Z")

</div>

The closest I’ve found in 4 days of google/documentation searching is:  
{{ ‘Dev API Key’ | **App\_API\_Key** (‘App\_API\_Key’) }}

But the filter **App\_API\_Key** is not built-in, and not recognized. I don’t know what filter to use for a customer credential type.

The only thing left I can think to try is use the Custom Credential type name as the filter, but I suspect I would need to remove the space in it.

---

<div class="post-metadata">

**Author:** ![dbrennand](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/dbrennand/32/7830_2.png) [@dbrennand](https://forum.ansible.com/u/dbrennand)\
**Post date:** [September 19, 2025, 5:54pm UTC](https://forum.ansible.com/t/help-needed-using-custom-credential-value-in-webhook-notification-header/44518/5 "2025-09-19T17:54:49Z")

</div>

OK, you’re configuring a Notification Template with the Webhook type. That wasn’t clear to me in your initial post.

I don’t know of any way to access a Credential within a Notification Template. I don’t think it’s possible. The AWX Community documentation shows an example with an `Authentication` header having the value directly.

> **[27. Notifications — Ansible AWX community documentation](https://ansible.readthedocs.io/projects/awx/en/24.6.1/userguide/notifications.html#webhook)**

---

<div class="post-metadata">

**Author:** ![Narizz28](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/narizz28/32/9476_2.png) [@Narizz28](https://forum.ansible.com/u/Narizz28)\
**Post date:** [September 19, 2025, 5:58pm UTC](https://forum.ansible.com/t/help-needed-using-custom-credential-value-in-webhook-notification-header/44518/6 "2025-09-19T17:58:47Z")

</div>

Yep, I’ve been all over the docs. Here is another suggestion Google came up with:

```auto
{
      "Authorization": "Basic {{ '{{' }} MyWebhookAuth.username {{ '}}' }}:{{ '{{' }} MyWebhookAuth.password {{ '}}' }} | b64encode }}"
}

```

But so far it’s not working using my values.
