# Using Vault sends values as {{vault:token}} instead of real value

**URL:** <https://community.postman.com/t/using-vault-sends-values-as-vault-token-instead-of-real-value/68970>\
**Category:** Help Hub\
**Tags:** variables, authentication\
**Created:** [September 27, 2024, 12:49pm UTC](https://community.postman.com/t/using-vault-sends-values-as-vault-token-instead-of-real-value/68970 "2024-09-27T12:49:34Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![balzanelli](https://avatars.discourse-cdn.com/v4/letter/b/f04885/32.png) [@balzanelli](https://community.postman.com/u/balzanelli)\
**Post date:** [September 27, 2024, 12:49pm UTC](https://community.postman.com/t/using-vault-sends-values-as-vault-token-instead-of-real-value/68970/1 "2024-09-27T12:49:34Z")

</div>

I’m trying to use Postman Vault to make the authentication in my requests, but, instead of sending the actual value, it sends it as {{value:token}}.

I’m using Postman for Windows, adding to my Collection the Authorization method as API Key, in the moment I try sending the request, it returns that the headers as Authorization: {{vault:token}}.

Is there any way to fix it?

#vault, #authorization, #authentication

---

<div class="post-metadata">

**Author:** ![danny-dainton](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/danny-dainton/32/29401_2.png) [@danny-dainton](https://community.postman.com/u/danny-dainton)\
**Post date:** [September 27, 2024, 1:12pm UTC](https://community.postman.com/t/using-vault-sends-values-as-vault-token-instead-of-real-value/68970/2 "2024-09-27T13:12:00Z")

</div>

Hey @balzanelli 👋

Welcome to the Postman Community! :postman:

Which version are you using? This is the desktop app or the web browser version?

Do you have any specific domains set for the Vault variable?

---

<div class="post-metadata">

**Author:** ![balzanelli](https://avatars.discourse-cdn.com/v4/letter/b/f04885/32.png) [@balzanelli](https://community.postman.com/u/balzanelli)\
**Post date:** [September 27, 2024, 1:18pm UTC](https://community.postman.com/t/using-vault-sends-values-as-vault-token-instead-of-real-value/68970/3 "2024-09-27T13:18:13Z")

</div>

> [@balzanelli](#):
>
> Postman for

It’s Postman Desktop app for Windows.

I’ve set my localhost address (IP) for the allowed domains.

---

<div class="post-metadata">

**Author:** ![danny-dainton](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/danny-dainton/32/29401_2.png) [@danny-dainton](https://community.postman.com/u/danny-dainton)\
**Post date:** [September 27, 2024, 1:25pm UTC](https://community.postman.com/t/using-vault-sends-values-as-vault-token-instead-of-real-value/68970/4 "2024-09-27T13:25:44Z")

</div>

Out of interest, if you remove that domain so the vault variable could be used on any many - Does that resolve it in the request?

---

<div class="post-metadata">

**Author:** ![balzanelli](https://avatars.discourse-cdn.com/v4/letter/b/f04885/32.png) [@balzanelli](https://community.postman.com/u/balzanelli)\
**Post date:** [September 27, 2024, 1:30pm UTC](https://community.postman.com/t/using-vault-sends-values-as-vault-token-instead-of-real-value/68970/5 "2024-09-27T13:30:29Z")

</div>

Removing the domain solved the issue, thank you!

---

<div class="post-metadata">

**Author:** ![danny-dainton](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/danny-dainton/32/29401_2.png) [@danny-dainton](https://community.postman.com/u/danny-dainton)\
**Post date:** [September 27, 2024, 1:33pm UTC](https://community.postman.com/t/using-vault-sends-values-as-vault-token-instead-of-real-value/68970/6 "2024-09-27T13:33:52Z")

</div>

Awesome! I’d still love to get to the bottom of why it’s not working for the ip address.

Do you / did you include `http://` with your ip address when you tried it?

The domains auto default to `https://` so that might be the issue.

---

<div class="post-metadata">

**Author:** ![balzanelli](https://avatars.discourse-cdn.com/v4/letter/b/f04885/32.png) [@balzanelli](https://community.postman.com/u/balzanelli)\
**Post date:** [September 27, 2024, 2:16pm UTC](https://community.postman.com/t/using-vault-sends-values-as-vault-token-instead-of-real-value/68970/7 "2024-09-27T14:16:00Z")

</div>

Yes, I’ve added as `http://` when addind the IP.

![image](https://us1.discourse-cdn.com/getpostman/original/3X/f/f/ff58a36e4940b0886840129efecf269d514e55dd.png)

The console also returns me the correct IP requested.

---

<div class="post-metadata">

**Author:** ![danny-dainton](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/danny-dainton/32/29401_2.png) [@danny-dainton](https://community.postman.com/u/danny-dainton)\
**Post date:** [September 27, 2024, 2:44pm UTC](https://community.postman.com/t/using-vault-sends-values-as-vault-token-instead-of-real-value/68970/8 "2024-09-27T14:44:39Z")

</div>

Were you also mentioning _localhost_ in the URL or was that just `{{vault:var_name}}/endpoint`.

Still trying to build up the picture of what you had and why it wasn’t working as we’re unable to recreate it. ☹

---

<div class="post-metadata">

**Author:** ![balzanelli](https://avatars.discourse-cdn.com/v4/letter/b/f04885/32.png) [@balzanelli](https://community.postman.com/u/balzanelli)\
**Post date:** [September 27, 2024, 3:07pm UTC](https://community.postman.com/t/using-vault-sends-values-as-vault-token-instead-of-real-value/68970/9 "2024-09-27T15:07:42Z")

</div>

This is an example of the full usage:

I created an `token` variable inside the vault for security reasons, I called it as `token`, and added the token in the var value. And, for the allowed domains, I added my IP (let’s say, here, that it’s `http://123.345.6.7:8180` - Postman removes the port automatically).

 ![image](https://us1.discourse-cdn.com/getpostman/original/3X/5/d/5d450c77c952675f1da374254c1b7ec55660b269.png)

So, I created an `Environment`, that contains my `baseUrl` (my IP address). Also, I created the segment (let’s say, also here, that it’s `postman/test`) (The current value is the same as the initial value).

 ![image](https://us1.discourse-cdn.com/getpostman/original/3X/e/6/e6438fbf62fe4348f8f5f1bba19903ce340871b5.png)

After this, I connected to the correct `Environment`, and created the following request in a Folder inside Collection:

For now, the full URL would be the following:  
`http://123.345.6.7:8180/postman/test/desiderd_endpoint`

But I need to be authenticated in order to receive the data, so, I add in the `Headers` , the `Authorization` method (API Key), with the value as `{{vault:token}}`, all this in my Collection.

![image](https://us1.discourse-cdn.com/getpostman/original/3X/c/2/c245758ad3c120650825ae0e8c9f312155fd5fc2.png)

Now, I go into the folder that contains the desired endpoint, I verify if the Authorization is using _Inherit auth from Parent_, and also verified if the folder is using the same configuration, _Inherit auth from Parent_. Everything looks to be correctly setted.

When I try to call the request, it returns me that I’m using invalid credentials, taking a look at the console, it has the following:

`GET http://123.345.6.7:8180/postman/test/desired_endpoint`  
Status: `401 - Unauthorized`  
Request headers:

- `Authorization: {{vault:token}}`

Response body:

- `{"error": "Invalid credential"}`

But, if I remove the domain from the allowed domains, it works:

`GET http://123.345.6.7:8180/postman/test/desired_endpoint`  
Status: `200 - OK`  
Request headers:

- `Authorization: ***** `

Response body:

- `data`

---

<div class="post-metadata">

**Author:** ![balzanelli](https://avatars.discourse-cdn.com/v4/letter/b/f04885/32.png) [@balzanelli](https://community.postman.com/u/balzanelli)\
**Post date:** [September 27, 2024, 3:08pm UTC](https://community.postman.com/t/using-vault-sends-values-as-vault-token-instead-of-real-value/68970/10 "2024-09-27T15:08:32Z")

</div>

This is the request, website didn’t allow me to add more than 3 embbeds:

![image](https://us1.discourse-cdn.com/getpostman/original/3X/2/0/2011361cad52df93906be9ad655eddaf9bad373c.png)

Would any other info help you?

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/system/32/29796_2.png) [@system](https://community.postman.com/u/system)\
**Post date:** [September 30, 2024, 3:08pm UTC](https://community.postman.com/t/using-vault-sends-values-as-vault-token-instead-of-real-value/68970/11 "2024-09-30T15:08:45Z")

</div>

Closed on September 30, 2024, 3:08pm UTC

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