# Issue completing OAuth 2 flow

**URL:** <https://community.postman.com/t/issue-completing-oauth-2-flow/6567>\
**Category:** Help Hub\
**Tags:** authentication\
**Created:** [July 16, 2019, 8:35am UTC](https://community.postman.com/t/issue-completing-oauth-2-flow/6567 "2019-07-16T08:35:54Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![cbetta](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/cbetta/32/3754_2.png) [@cbetta](https://community.postman.com/u/cbetta)\
**Post date:** [July 16, 2019, 8:35am UTC](https://community.postman.com/t/issue-completing-oauth-2-flow/6567/1 "2019-07-16T08:35:54Z")

</div>

I have an issue completing the OAuth 2.0 flow for the Box API.

I use the “Get New Access Token” UI and fill in all the relevant URLs, client ID, and client secret. I get presented with the Box login, and I log in and approve the app.

Up to there everything goes fine, but when Postman makes the API call to exchange the authorization code for an access token it seems to forget the client secret, which results in an error in the Box API.

I am not sure if I missed anything, but I’d love some guidance. Here are my settings.

 ![34](https://us1.discourse-cdn.com/getpostman/original/2X/f/fb0cb887af10d12283ba15d4b1f69f4ca8adda89.png)

---

<div class="post-metadata">

**Author:** ![cbetta](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/cbetta/32/3754_2.png) [@cbetta](https://community.postman.com/u/cbetta)\
**Post date:** [July 16, 2019, 8:38am UTC](https://community.postman.com/t/issue-completing-oauth-2-flow/6567/2 "2019-07-16T08:38:26Z")

</div>

And to follow up, here is what is output in the console. As you can see the client secret is missing.

 ![08](https://us1.discourse-cdn.com/getpostman/original/3X/3/6/3668cbc58991a9511f13521d24904e32c9203b81.png)

---

<div class="post-metadata">

**Author:** ![postman-kyle](https://avatars.discourse-cdn.com/v4/letter/p/47e85d/32.png) [@postman-kyle](https://community.postman.com/u/postman-kyle)\
**Post date:** [July 18, 2019, 9:19pm UTC](https://community.postman.com/t/issue-completing-oauth-2-flow/6567/3 "2019-07-18T21:19:11Z")

</div>

`invalid_client` kinda tells me it’s using OpenID Connect to authenticate. Not 100% sure. But I’m running into this same problem with OpenID Connect on another API.

OpenID Connect uses OAuth2.0, which Postman supports, but OpenID Connect is not supported. You might have to script outside of Postman to get the token and then plug it in to use OAuth2.0

Also you might want to change your `Client Authentication` is suppose to send as Basic Auth Header or query parameters.

And if your scope might just be `code` or `token` as it usually is when your trying to authenticate.

Box API’s documentation doesn’t make this clear to me, but it seems to want everything in query parameters.

---

<div class="post-metadata">

**Author:** ![cbetta](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/cbetta/32/3754_2.png) [@cbetta](https://community.postman.com/u/cbetta)\
**Post date:** [July 19, 2019, 9:59am UTC](https://community.postman.com/t/issue-completing-oauth-2-flow/6567/4 "2019-07-19T09:59:51Z")

</div>

Tnx Kyle. I found the issue eventually, I had to change the last setting (Client Authentication) to send the credentials in the Body.

---

<div class="post-metadata">

**Author:** ![stevenwnlee](https://avatars.discourse-cdn.com/v4/letter/s/5fc32e/32.png) [@stevenwnlee](https://community.postman.com/u/stevenwnlee)\
**Post date:** [September 11, 2019, 5:47pm UTC](https://community.postman.com/t/issue-completing-oauth-2-flow/6567/5 "2019-09-11T17:47:19Z")

</div>

Solved the same “invaid\_client” problem for me too by changing  
“Client Authentication” to “Send client credentials in body”

---

<div class="post-metadata">

**Author:** ![heyFahad](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/heyfahad/32/10074_2.png) [@heyFahad](https://community.postman.com/u/heyFahad)\
**Post date:** [October 15, 2021, 9:31am UTC](https://community.postman.com/t/issue-completing-oauth-2-flow/6567/6 "2021-10-15T09:31:15Z")

</div>

I had been struggling with this issue since yesterday. I’m working with quite a lot of integrations these days which all were working fine except one.  
Thank you for the wise words \<3

---

<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:** [August 30, 2023, 12:56pm UTC](https://community.postman.com/t/issue-completing-oauth-2-flow/6567/7 "2023-08-30T12:56:20Z")

</div>

Closed on August 30, 2023, 12:56pm UTC

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