# Creating Browser Response for OAuth Code flow with 3 scopes

**URL:** <https://community.postman.com/t/creating-browser-response-for-oauth-code-flow-with-3-scopes/60880>\
**Category:** Help Hub\
**Tags:** variables, authentication\
**Created:** [May 10, 2024, 1:12am UTC](https://community.postman.com/t/creating-browser-response-for-oauth-code-flow-with-3-scopes/60880 "2024-05-10T01:12:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![naipaulojar](https://avatars.discourse-cdn.com/v4/letter/n/a88e57/32.png) [@naipaulojar](https://community.postman.com/u/naipaulojar)\
**Post date:** [May 10, 2024, 1:12am UTC](https://community.postman.com/t/creating-browser-response-for-oauth-code-flow-with-3-scopes/60880/1 "2024-05-10T01:12:03Z")

</div>

I previously used Ping’s OAuth Playground for this but I have used Postman for multiple general API testing with collections.

I seem to be nearly where I need to be using 2 Postman’s methods to obtain an Access Token, but a little guidance is required.

Issues:

1. The Authorization Server wants the list of scopes separated by the “+” character not " " or encoded %2B

- Using the Get Access Token button, I am able to pass only 1 scope as the “+” is encoded to %2B
- I am not able to use the pre-script parsing method to remap the “+”
- I am able to get the Browser Re-Direct and be able to enter my username & password in the HTML Form, then get AT & ID Tokens

1. Using the standard posting methods, of PUT & OAuth URL, I am stuck.  
I get back a lovely HTML page in text but not via a browser, but the rest of the URL data is correct

- the HTML page does have a considerable amount of JavaScript

Disabling encoding does not seem to apply to the Get Access Token page

---

<div class="post-metadata">

**Author:** ![gbadebo-bello](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/gbadebo-bello/32/12175_2.png) [@gbadebo-bello](https://community.postman.com/u/gbadebo-bello)\
**Post date:** [May 10, 2024, 12:26pm UTC](https://community.postman.com/t/creating-browser-response-for-oauth-code-flow-with-3-scopes/60880/2 "2024-05-10T12:26:31Z")

</div>

Hi @naipaulojar. Welcome to the Postman Community.

For 1:

- You can separate scopes with your preferred delimiter in the input field for scoped in the OAuth helper. I used ‘+’ in the screenshot below.  
 ![Screenshot 2024-05-10 at 12.57.39](https://us1.discourse-cdn.com/getpostman/original/3X/2/2/227faa6b8836b395d76b5d9f41bae614b1e1b304.png)
- You can’t use pre-request scripts to modify the OAuth helper parameters at this time. Please feel free to make a [feature request here](https://github.com/postmanlabs/postman-app-support/issues/new?assignees=&labels=feature&projects=&template=feature_request.yml)

For 2:

- You can switch to the visualizer tab to see the HTML output of the gotten response. See the screenshot below.  
 ![image](https://us1.discourse-cdn.com/getpostman/original/3X/c/8/c8fbfb52b095bd06413cc42a14620de805a8e94b.png)
- I won’t advise you to use the above to input credentials as you’ll need to get the authorization grant from the redirect URI. The Authorization request is always a GET request to a URL, and it redirects you to an HTML page. If you copy the Authorization request in your Postman address bar and paste that into your browser URL, you’ll get the same HTML page rendered and when you enter your credentials and authorize the requests, it will redirect you to the redirect URL which should contain the authorization code.
- Note that the above narration only works if you’re using an authorization code as your authorization grant or when working with PKCE.

---

<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:** [June 9, 2024, 12:27pm UTC](https://community.postman.com/t/creating-browser-response-for-oauth-code-flow-with-3-scopes/60880/3 "2024-06-09T12:27:25Z")

</div>

Closed on June 9, 2024, 12:27pm UTC

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