Document generated code snippet missing Authorization header
Is there an existing issue for this?
- [X] I have searched the tracker for existing similar issues
Describe the Issue
Generating code snippet of the request in POSTMAN APP is as expected, the header "Authorization" is generated correctly.
But if the API is published as documentation, it is not showing the header when generate the curl command.
You may refer to the following screenshot, this is the documentation that I published from my API collection

Steps To Reproduce
- Create an API request in your API collection, by ticking "Inherit auth from parent"
- Right click the API collection > View documentation
- Publish the documentation.
- Check the link, and you will see the curl is not generating Authorization header.
Screenshots or Videos
No response
Environment Information
- Operating System: macOS Monterey
- Platform Type: Native App / Postman Documenter
- Postman Version: 9.15.4
Additional Context?
No response
Hey @wessRay, thanks for sharing your feedback. We will look into this and keep you posted.
yes. please. this is very troublesome
@wessRay We are considering a few security concerns about adding Auth information in the generated Code snippets. We will keep you updated with our decision 🙇
Hi @akshaydeo . thank you. i think most of us doesn't need the actual value of token being generated to code snippets. perhaps POSTMAN team can generate a variable placeholder for us?
for example:
curl --location --request POST 'https://api.example.com/api/auth/me' \
--header "Authorization: Bearer $TOKEN" \
--header 'Accept: application/json' \
--header 'Content-Type: application/json'
at least with this, we will able to declare the $TOKEN variable first before we use the curl command?
Any updates?
Nothing yet?
Any updates?
I'm also looking for this. If security is a concern, an option in the collection to add or not the auth in the request example would be great.