# OAuth 2.0 Postman Pre-Request Issue

**URL:** <https://community.postman.com/t/oauth-2-0-postman-pre-request-issue/64253>\
**Category:** Help Hub\
**Tags:** authorization, monitor\
**Created:** [July 18, 2024, 11:07am UTC](https://community.postman.com/t/oauth-2-0-postman-pre-request-issue/64253 "2024-07-18T11:07:25Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![danny-dainton](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/danny-dainton/32/29401_2.png) [@danny-dainton](https://community.postman.com/u/danny-dainton)\
**Post date:** [July 18, 2024, 3:17pm UTC](https://community.postman.com/t/oauth-2-0-postman-pre-request-issue/64253/8 "2024-07-18T15:17:28Z")

</div>

This might be what you’re after:

> [@Pre-request script to automate authorization code grant type](https://community.postman.com/t/pre-request-script-to-automate-authorization-code-grant-type/45989/13):
>
> Hey @lunar-module-cosmo13 ! So automating this workflow can be a bit tricky because it typically requires user interaction to provide consent, however if your OAuth provider has a way to bypass the user consent for trusted applications, you can attempt to automate this within the pre-request script section. Here’s a rough outline of steps: Generate an auth code pm.sendRequest({ url: '{{AuthURL}}?client\_id={{ClientId}}&redirect\_uri={{redirect URL}}&scope={{Scope}}&response\_type=code', …

---

_[View the full topic](https://community.postman.com/t/oauth-2-0-postman-pre-request-issue/64253)._
