Postman is an API platform for building and using APIs. Postman simplifies each step of the API lifecycle and streamlines collaboration so you can create better APIs—faster.
[X] I have searched the existing issues for this feature request and I know that duplicates will be closed
Is your feature request related to a problem?
My API uses OAuth 2.0 for authentication with each subsequent call requiring an access token specified as a Bearer tokens in the Authorization header.
Inside the Postman app, the code is generated correctly (adding the Authorization header). However, in the docs, the generated call looks very different and the Authorization header is missing entirely.
I would expect that both the docs and the app generate the same code for the same call.
Here’s an example of the difference in cURL:
Documented end-points and example requests in Postman-generated documentation should include any authorization bearer tokens when authentication settings have been configured for the collection
Describe alternatives you've considered
An unacceptably tedious workaround is to manually add the bearer token to every single request in the Postman collection.
Is there an existing request for this feature?
Is your feature request related to a problem?
My API uses OAuth 2.0 for authentication with each subsequent call requiring an access token specified as a Bearer tokens in the Authorization header.
Inside the Postman app, the code is generated correctly (adding the Authorization header). However, in the docs, the generated call looks very different and the Authorization header is missing entirely. I would expect that both the docs and the app generate the same code for the same call. Here’s an example of the difference in cURL:
App:
Docs
Describe the solution you'd like
Documented end-points and example requests in Postman-generated documentation should include any authorization bearer tokens when authentication settings have been configured for the collection
Describe alternatives you've considered
An unacceptably tedious workaround is to manually add the bearer token to every single request in the Postman collection.
Additional context
Forum discussion on this topic