# Postman scripts for Login Using the Authorization Code Flow with PKCE

**URL:** <https://community.auth0.com/t/postman-scripts-for-login-using-the-authorization-code-flow-with-pkce/68709>\
**Category:** Get Help\
**Tags:** access-token, postman\
**Created:** [August 27, 2021, 8:44pm UTC](https://community.auth0.com/t/postman-scripts-for-login-using-the-authorization-code-flow-with-pkce/68709 "2021-08-27T20:44:53Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![raok1997](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/raok1997/32/13366_2.png) [@raok1997](https://community.auth0.com/u/raok1997)\
**Post date:** [August 27, 2021, 8:44pm UTC](https://community.auth0.com/t/postman-scripts-for-login-using-the-authorization-code-flow-with-pkce/68709/1 "2021-08-27T20:44:53Z")

</div>

Hi Gurus, I am new to Auth0 .

I trying to get access token for my app from Postman. I followed [Add Login Using the Authorization Code Flow with PKCE](https://auth0.com/docs/flows/add-login-using-the-authorization-code-flow-with-pkce) and was able to get the access\_token from browser. This token is in line with our expectations.

I am trying to automate this with Postman using the steps mentioned in [OAuth 2.0: Implicit Flow is Dead, Try PKCE Instead | Postman Blog](https://blog.postman.com/pkce-oauth-how-to/) . The access token from postman is differen and jwt says invalid signature, but the id\_token is same. Could you shed some light what i might be doing wrong. Attached the postman script images to Get New Access Token.

 ![ConfigurationOptions](https://global.discourse-cdn.com/auth0/original/3X/1/4/14588afe50cc72a0b709a0c61d3da21dd37e5d4a.png)

 ![AdvancedOptions](https://global.discourse-cdn.com/auth0/original/3X/0/f/0f728c5a3ddd50a2d53e9eaaa3c378a0dc1d5ee3.png)

**Token screenshot**

 ![Token](https://global.discourse-cdn.com/auth0/original/3X/0/d/0d897536849508dfee79b48d98ff1f3efbf9131e.png)

Appreciate your support!!

---

<div class="post-metadata">

**Author:** ![raok1997](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/raok1997/32/13366_2.png) [@raok1997](https://community.auth0.com/u/raok1997)\
**Post date:** [August 31, 2021, 7:40pm UTC](https://community.auth0.com/t/postman-scripts-for-login-using-the-authorization-code-flow-with-pkce/68709/2 "2021-08-31T19:40:24Z")

</div>

Hi Gurus, I tried the postman collection [Collection Web View | Postman](https://app.getpostman.com/run-collection/90d43da958b7e910ff1a) with postman v8.11.x and v7.36.5 but still no luck. Could any one help with this?

---

<div class="post-metadata">

**Author:** ![raok1997](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/raok1997/32/13366_2.png) [@raok1997](https://community.auth0.com/u/raok1997)\
**Post date:** [August 31, 2021, 8:04pm UTC](https://community.auth0.com/t/postman-scripts-for-login-using-the-authorization-code-flow-with-pkce/68709/3 "2021-08-31T20:04:50Z")

</div>

Also, tried the [GitHub - auth0/postman-collections: Postman collections for Auth0 public APIs](https://github.com/auth0/postman-collections) with Postman v7.36.5, but still no luck. Did anyone successfully use the Authorization Code (PKCE) request (from Get Access Token of Auth0 Authentication API) ?

---

<div class="post-metadata">

**Author:** ![john.gateley](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/john.gateley/32/10879_2.png) [@john.gateley](https://community.auth0.com/u/john.gateley)\
**Post date:** [September 1, 2021, 2:35pm UTC](https://community.auth0.com/t/postman-scripts-for-login-using-the-authorization-code-flow-with-pkce/68709/4 "2021-09-01T14:35:12Z")

</div>

Hi @raok1997

Your access token is opaque, not a JWT. This happens when you don’t specify an audience.

If you specify an audience (I am not sure how to do that in Postman) you will get a JWT access token back.

John

---

<div class="post-metadata">

**Author:** ![prashanth](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/prashanth/32/63549_2.png) [@prashanth](https://community.auth0.com/u/prashanth)\
**Post date:** [November 28, 2024, 8:11am UTC](https://community.auth0.com/t/postman-scripts-for-login-using-the-authorization-code-flow-with-pkce/68709/5 "2024-11-28T08:11:47Z")

</div>

I was able to get this working in Postman using Authorization Code with PKCE. The key is to pass the “audience” in the Auth Request section and change the “Client Authentication” value to “Send client credentials in body”.

---

<div class="post-metadata">

**Author:** ![dawid.matuszczyk](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dawid.matuszczyk/32/74550_2.png) [@dawid.matuszczyk](https://community.auth0.com/u/dawid.matuszczyk)\
**Post date:** [November 28, 2024, 8:55am UTC](https://community.auth0.com/t/postman-scripts-for-login-using-the-authorization-code-flow-with-pkce/68709/6 "2024-11-28T08:55:32Z")

</div>

Thank you for providing the solution with the community @prashanth!

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [December 12, 2024, 8:55am UTC](https://community.auth0.com/t/postman-scripts-for-login-using-the-authorization-code-flow-with-pkce/68709/7 "2024-12-12T08:55:56Z")

</div>

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