Collection Variables don't seem to be working

My question:

I’m not able to get Collection variables to work. I first set the variable in the Collection Variable Tab (See screen shot). I then create a new request that uses the variable but Postman says the Variable is Unresolved (See screen shot).

Also, If I set a collection variable by right clicking on a value in a request, it works, but when I look at the collection variable tab, the variable is not there.

I seem to be missing something fundamental so some help is appreciated.

Details (like screenshots):

1 Like

Hey there!
Sorry you’re having some trouble with this. Definitely not the kind of experience we want our users to have!

There have been some issues with Postman Sync this week. You can check for service interruptions on the Postman Status page here.

The other possibility would be your internet connection. Are you perhaps behind a proxy or on an unstable connection?

Could you try to save the collection and retry after closing and re-opening your Postman tab(s)? Could possibly be a conflict issue.

If this continues to occur, I would recommend opening a support ticket here.

1 Like

Hello @dadwhocooks, Welcome to the community :partying_face: Good to have your here. Could you please save the collection and try again? I see that the “Save” button is enabled, once there’s no new updates, it will be disabled :wink:

1 Like

@bpricilla @kevinc-postman found this thread when looking for a similar problem.

I just created a new Team and moved some of my older collections into it, and the first thing I noticed was that the “Authorization” token was shared among everyone who used it. This is a problem since the Authorization token needs to be set by and unique for each user, and sharing it among users is going to cause users to stomp on other user values, which is a Bad Thing.

I noticed the “This isn’t secure; use variables!” note, and discovered the idea of Environments, which is great, but … it wouldn’t actually allow me to set the Token to a variable. I would set it to {{token}}, either by hand or by using the Set Variable pop-up, and then I would hit save…and it would revert to the original raw token.

I also tried creating a collection variable, and every time I would create it and hit save, it would delete the newly created variable.

And…five minutes later, it seems to be working again? Your server status link shows no problems in the last 15 minutes or so, but it seems there may have been an issue?

Regardless, it would be nice if a freshly made change weren’t immediately overwritten if a save-to-server failed. That seems like a Postman bug, even if the bug only happens when the servers aren’t responding or updating reliably. Maybe something to do with creating a brand new team?

I still have the issue of wanting the token to be defined on a per-user basis, though. Thoughts?

1 Like

Hey Tim!
This sounds like an interesting situation :thinking:

I wonder if it’s due to some kind of caching or having multiple windows open?

Have you tried reporting this via Github or opening a support ticket yet? This would be the best way to get an answer as to what could be happening.

Best practices for handling tokens, keys and such would be environment variables and saving them under “Current Value” with the “secret” variable type. Tokens and the sort should never be stored on the collection level or under “Initial Value”.

Environments make it a bit easier to manage things in a team where variables may need to vary from person to person. With “Current Value”, that is ONLY synced to your current session. This means that if you have something there on your web browser but then open the desktop app, that field will appear empty on the desktop app and to anyone else viewing the environment in your team.

Hope this helps!

Current value sounds like what I need.

Given the other issue was ephemeral, I didn’t think filing a report would be worthwhile. And at this point it’s really too late.

How do you reconcile that philosophy when Postman servers don’t use Current Value, only Initial Value? If tokens and secrets shouldn’t be assigned to Initial Value to protect them, what are our options?

Was this ever resolved? I’m experiencing this same issue right now. Seemingly anything I do at the Collection level–Auth or Variables–doesn’t have effect on my Requests even after I “Save” the Collection or “Persist” Variables.

1 Like

Still broken btw. Does not save at all. Restart of postman or mac… still the same. Any plans on fixing this anytime soon?

Hey @yadu4992 :wave:t2:

As this topic and thread has been open for a while now, can you explain more about your context and workflow where you’re seeing the issue?

Providing visual examples will help show the problem too.