# Pulling custom credential values into HTTP request's headers and body

**URL:** <https://community.n8n.io/t/pulling-custom-credential-values-into-http-requests-headers-and-body/129048>\
**Category:** Questions\
**Created:** [June 8, 2025, 4:15pm UTC](https://community.n8n.io/t/pulling-custom-credential-values-into-http-requests-headers-and-body/129048 "2025-06-08T16:15:07Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![nimrod](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/nimrod/32/88611_2.png) [@nimrod](https://community.n8n.io/u/nimrod)\
**Post date:** [June 8, 2025, 4:15pm UTC](https://community.n8n.io/t/pulling-custom-credential-values-into-http-requests-headers-and-body/129048/1 "2025-06-08T16:15:07Z")

</div>

## Cannot pull the custom information saved in the credentials object into an HTTP header and body.

An external API i’m using requires to send the username in the request body. I thought the best way would be to keep it in the credentials, but I cannot find a way to pull it.

## Please share your workflow

```auto
(Select the nodes on your canvas and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow.)

```

## Share the output returned by the last node

## Information on your n8n setup

- **n8n version:**
- **Database (default: SQLite):**
- **n8n EXECUTIONS\_PROCESS setting (default: own, main):**
- **Running n8n via (Docker, npm, n8n cloud, desktop app):**
- **Operating system:**

---

<div class="post-metadata">

**Author:** ![Sudhanshu\_Sharma](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/sudhanshu_sharma/32/42557_2.png) [@Sudhanshu\_Sharma](https://community.n8n.io/u/Sudhanshu_Sharma)\
**Post date:** [June 8, 2025, 4:20pm UTC](https://community.n8n.io/t/pulling-custom-credential-values-into-http-requests-headers-and-body/129048/2 "2025-06-08T16:20:49Z")

</div>

Hi @nimrod,

It’s not possible to reference values directly from stored credentials in n8n.

---

<div class="post-metadata">

**Author:** ![darrell\_tw](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/darrell_tw/32/52180_2.png) [@darrell\_tw](https://community.n8n.io/u/darrell_tw)\
**Post date:** [June 8, 2025, 5:22pm UTC](https://community.n8n.io/t/pulling-custom-credential-values-into-http-requests-headers-and-body/129048/3 "2025-06-08T17:22:41Z")

</div>

Sorry we can not see the actual credential you are using because share workflow code will not include this sensitive information.

But we might need more information first.

* * *

How you set the credential?  
there are many way. Like `query auth`, `header auth`

Once you set them correctly.

You can just select the credential in the `Http request` node.

 ![Screenshot_20250609_012218_eMKOf8as@2x](https://europe1.discourse-cdn.com/n8n/original/3X/4/2/42819d4ca844c444b767fd163325908973c05c9e.png)

Here is an example for `header auth`.

---

<div class="post-metadata">

**Author:** ![nimrod](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/nimrod/32/88611_2.png) [@nimrod](https://community.n8n.io/u/nimrod)\
**Post date:** [June 8, 2025, 6:18pm UTC](https://community.n8n.io/t/pulling-custom-credential-values-into-http-requests-headers-and-body/129048/4 "2025-06-08T18:18:57Z")

</div>

I believe this answer to be completely irrelevant to my case. its demonstrating how to set the credentials, which is pretty straight forward. I was asking about how to access the credential object from the http request custom header, and body

---

<div class="post-metadata">

**Author:** ![nimrod](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/nimrod/32/88611_2.png) [@nimrod](https://community.n8n.io/u/nimrod)\
**Post date:** [June 8, 2025, 6:19pm UTC](https://community.n8n.io/t/pulling-custom-credential-values-into-http-requests-headers-and-body/129048/5 "2025-06-08T18:19:30Z")

</div>

thanks Sudhanshu, I’ll have to figure out another way to deal with it then.

---

<div class="post-metadata">

**Author:** ![darrell\_tw](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/darrell_tw/32/52180_2.png) [@darrell\_tw](https://community.n8n.io/u/darrell_tw)\
**Post date:** [June 9, 2025, 1:44am UTC](https://community.n8n.io/t/pulling-custom-credential-values-into-http-requests-headers-and-body/129048/6 "2025-06-09T01:44:03Z")

</div>

Okay after think again about your question.

The credential is designed for bearer token.

Not recommend to set `username` as credential.

* * *

Why we can not access the value in credential?

Because we don’t want anyone we can directly see what’s the value inside.

So if we can pull the value from credential and see it.

Then we should not use `credential` at all. The meaning of protectation is gone here.

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/system/32/195824_2.png) [@system](https://community.n8n.io/u/system)\
**Post date:** [September 7, 2025, 1:44am UTC](https://community.n8n.io/t/pulling-custom-credential-values-into-http-requests-headers-and-body/129048/7 "2025-09-07T01:44:34Z")

</div>

Closed on September 7, 2025, 1:44am UTC

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
