# OAuth2.0 refresh without Basic authentication header

**URL:** <https://community.postman.com/t/oauth2-0-refresh-without-basic-authentication-header/46568>\
**Category:** Help Hub\
**Tags:** authentication, oauth2\
**Created:** [April 20, 2023, 10:13am UTC](https://community.postman.com/t/oauth2-0-refresh-without-basic-authentication-header/46568 "2023-04-20T10:13:01Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![kevj23](https://avatars.discourse-cdn.com/v4/letter/k/c4cdca/32.png) [@kevj23](https://community.postman.com/u/kevj23)\
**Post date:** [April 20, 2023, 10:13am UTC](https://community.postman.com/t/oauth2-0-refresh-without-basic-authentication-header/46568/1 "2023-04-20T10:13:02Z")

</div>

Hi all,  
Following the fix (thanks for that!) of [Issue #11559](https://github.com/postmanlabs/postman-app-support/issues/11559) I’m revisiting getting my Collection to automatically refresh my OAuth2 token when it’s expired.

I can now put client\_id in the refresh payload using the new ‘advanced’ section, but I’m still getting an ‘invalid\_client’ error. I duplicated the call from the console into a new request, and discovered that the problem is that the request performed by Postman’s refresh code has an Authorization header (Basic auth of `{{client_id}}:{{client_secret}}`; if I remove that header and just send the body:

```auto
refresh_token: <refresh_token>
grant_type: 'refresh_token'
client_id: '<<my client_id>'

```

then I get a new token correctly returned.  
I must be missing something here: how can I NOT send an Authorization header? I can’t see an option to turn it off. The target generating the token is an AWS Cognito provider, and I can’t change its options because it’s used by a bunch of other services.

New tokens are generated using Grant Type=‘Authorization Code’ so it pops up a browser to authenticate, so I shouldn’t need to send any auth header, right?

Thoughts? I’m sure it’s operator error but I can’t figure out where…
