# "Invalid client\_id or client\_secret"

**URL:** <https://devforum.zoom.us/t/invalid-client-id-or-client-secret/5252>\
**Category:** API and Webhooks\
**Created:** [July 30, 2019, 8:05am UTC](https://devforum.zoom.us/t/invalid-client-id-or-client-secret/5252 "2019-07-30T08:05:41Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![abhilash](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/abhilash/32/1285_2.png) [@abhilash](https://devforum.zoom.us/u/abhilash)\
**Post date:** [July 30, 2019, 8:05am UTC](https://devforum.zoom.us/t/invalid-client-id-or-client-secret/5252/1 "2019-07-30T08:05:41Z")

</div>

[https://zoom.us/oauth/token?grant\_type=authorization\_code&code=](https://zoom.us/oauth/token?grant_type=authorization_code&code=){my code}&redirection\_uri={my callback URL}

Making a POST Request to the above URL shows

```
{
    "reason": "Invalid client_id or client_secret",
    "error": "invalid_client"
}

```

I’m not quite sure what the issue is. I had copy pasted the correct client ID before generating the `code`.

---

<div class="post-metadata">

**Author:** ![abhilash](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/abhilash/32/1285_2.png) [@abhilash](https://devforum.zoom.us/u/abhilash)\
**Post date:** [July 30, 2019, 3:12pm UTC](https://devforum.zoom.us/t/invalid-client-id-or-client-secret/5252/2 "2019-07-30T15:12:08Z")

</div>

Please help! This issue is really driving me nuts.

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [July 30, 2019, 4:46pm UTC](https://devforum.zoom.us/t/invalid-client-id-or-client-secret/5252/4 "2019-07-30T16:46:08Z")

</div>

Hey @abhilash,

Did you include the required [Authorization header](https://marketplace.zoom.us/docs/guides/authorization/oauth/oauth-with-zoom#request-access-token) in your request?

`"Authorization": "Basic base64Encode(Client_Id:Client_Secret)"`

([You can base64encode them here.](https://www.base64encode.org/) Make sure to include the `:` in between your client\_id and client\_secret)

It will look something like this  
`"Authorization": "Basic YXNkZmFzZGZha3M6YWRramZiYXNrbGRqZmFzZGY="`

Also, you need to change `redirection_uri` to `redirect_uri`.

Let me know if this works!

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![abhilash](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/abhilash/32/1285_2.png) [@abhilash](https://devforum.zoom.us/u/abhilash)\
**Post date:** [July 31, 2019, 5:40am UTC](https://devforum.zoom.us/t/invalid-client-id-or-client-secret/5252/5 "2019-07-31T05:40:15Z")

</div>

Worked like a charm.  
Also took a look at the documentation. Apologies for missing it.

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [July 31, 2019, 3:51pm UTC](https://devforum.zoom.us/t/invalid-client-id-or-client-secret/5252/6 "2019-07-31T15:51:26Z")

</div>

Glad it worked, no apology necessary!

We are happy to help! 🙂

---

<div class="post-metadata">

**Author:** ![Kadiri](https://avatars.discourse-cdn.com/v4/letter/k/6de8d8/32.png) [@Kadiri](https://devforum.zoom.us/u/Kadiri)\
**Post date:** [May 31, 2020, 8:28am UTC](https://devforum.zoom.us/t/invalid-client-id-or-client-secret/5252/8 "2020-05-31T08:28:32Z")

</div>

The same issue I’m struggling with. I am trying to get OAuth app authorization working in C# code via authorization code flow. JWT app is quite simple and easy. I got it easily working. I got the authorization code but failed to get access token. POST url is like this. [https://zoom.us/oauth/token?code={authorizationCode}&grant\_type=authorization\_code&redirect\_uri=https://zoom.us](https://zoom.us/oauth/token?code=%7BauthorizationCode%7D&grant_type=authorization_code&redirect_uri=https://zoom.us)  
The redirect\_uri is same as what’s registered with my app and white listed also. In the Authorization header I give “Bearer Base64(Client\_Id:Client\_Secret)” . For base64 encoding, I have used [https://www.base64encode.org/](https://www.base64encode.org/), character set is UTF8, destination new line separator LF (Unix). I am on Windows 10. I don’t think LF (Unix) cause problem here. I get exact same error as OP. It’s not working in C# code and from postman also.

![image](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/2X/f/fc629240808e06b41ce49c012cc342576979222a.png)

---

<div class="post-metadata">

**Author:** ![andrii.vandakurov](https://avatars.discourse-cdn.com/v4/letter/a/e9bcb4/32.png) [@andrii.vandakurov](https://devforum.zoom.us/u/andrii.vandakurov)\
**Post date:** [May 31, 2020, 12:52pm UTC](https://devforum.zoom.us/t/invalid-client-id-or-client-secret/5252/9 "2020-05-31T12:52:41Z")

</div>

@Kadiri Hi, according to the docs you should use `Basic` instead of `Bearer`.

---

<div class="post-metadata">

**Author:** ![Kadiri](https://avatars.discourse-cdn.com/v4/letter/k/6de8d8/32.png) [@Kadiri](https://devforum.zoom.us/u/Kadiri)\
**Post date:** [June 1, 2020, 9:52am UTC](https://devforum.zoom.us/t/invalid-client-id-or-client-secret/5252/10 "2020-06-01T09:52:22Z")

</div>

That’s the culprit. Thanks for pointing this out.

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [June 4, 2020, 7:43pm UTC](https://devforum.zoom.us/t/invalid-client-id-or-client-secret/5252/11 "2020-06-04T19:43:04Z")

</div>

Hey @Kadiri,

> [@Kadiri](#):
>
> In the Authorization header I give “Bearer Base64(Client\_Id:Client\_Secret)” .

It needs to use `Basic`, not `Bearer`.

`"Authorization": "Basic Base64(Client_Id:Client_Secret)"`

Thanks for your help @andrii.vandakurov! 🙂

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![littlechad](https://avatars.discourse-cdn.com/v4/letter/l/57b2e6/32.png) [@littlechad](https://devforum.zoom.us/u/littlechad)\
**Post date:** [November 9, 2020, 7:48pm UTC](https://devforum.zoom.us/t/invalid-client-id-or-client-secret/5252/12 "2020-11-09T19:48:50Z")

</div>

Hi there,

i am currently experiencing the same problem, i am using the [oauth flow](https://marketplace.zoom.us/docs/guides/auth/oauth)

my steps are:

1. I get the authorization code by hitting the `/oauth/authorize` endpoint
2. using the given code i then do an axios.post

```auto
    function token(data) {
        return new Observable(async (subscriber) => {
          try {
            const { root } = host
            const client = process.env.ZOOM_CLIENT_ID
            const secret = process.env.ZOOM_CLIENT_SECRET
            const raw = `${client}:${secret}`
            console.log('client: ', client)
            console.log('secret: ', secret)
            console.log('raw: ', raw)
      
            const authorization = Buffer.from(raw, 'utf8').toString('base64')
            console.log('authorization: ', authorization)
      
            const test = Buffer.from(authorization, 'base64').toString('utf8')
            console.log('test: ', test)

            const redirectUri = process.env.ZOOM_REDIRECT_URI //currently set to: http://localhost:3000/auth/callback/zoom 
      
            const options = {
              url: `/oauth/token?grant_type=authorization_code&code=${data.payloads.code}&redirect_uri=${redirectUri}`,
              headers: {
                Authorization: `Basic ${authorization}`,
              },
            }
      
            console.log('zoom token options: ', options)
            const result = await root.post(options.url, {}, options.headers)
      
            subscriber.next(result)
            subscriber.complete()
          } catch (error) {
            if (error.response) {
              subscriber.error(error.response.data.error)
            } else {
              subscriber.error(error)
            }
          }
        })
      }

```

the console.logs is for me to double check on things, and it seems that it is giving me the correct values

i tried encoding using `Buffer.from(raw, 'utf8').toString('base64')` and `Buffer.from(raw, 'binary').toString('base64')`

but still getting the `invalid_client` as response

is there something i missed?

---

<div class="post-metadata">

**Author:** ![will.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/will.zoom/32/14417_2.png) [@will.zoom](https://devforum.zoom.us/u/will.zoom)\
**Post date:** [November 10, 2020, 7:53pm UTC](https://devforum.zoom.us/t/invalid-client-id-or-client-secret/5252/13 "2020-11-10T19:53:36Z")

</div>

Hey @littlechad,

Thanks for sharing these details. Do you run into the same error when you test this request in Postman or using cURL?

Thanks,  
Will

---

<div class="post-metadata">

**Author:** ![littlechad](https://avatars.discourse-cdn.com/v4/letter/l/57b2e6/32.png) [@littlechad](https://devforum.zoom.us/u/littlechad)\
**Post date:** [November 11, 2020, 3:17am UTC](https://devforum.zoom.us/t/invalid-client-id-or-client-secret/5252/14 "2020-11-11T03:17:12Z")

</div>

i havent, will try it real quick, and get back to you

thanks

UPDATE: thanks for the hints, i think i manage to make this work, as it turns out that i need to put the query params as part of the 3rd argument on axios

---

<div class="post-metadata">

**Author:** ![will.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/will.zoom/32/14417_2.png) [@will.zoom](https://devforum.zoom.us/u/will.zoom)\
**Post date:** [November 11, 2020, 8:21pm UTC](https://devforum.zoom.us/t/invalid-client-id-or-client-secret/5252/15 "2020-11-11T20:21:25Z")

</div>

Ah, I see! Glad to hear it seems to be working now, @littlechad 🙂

Best,  
Will

---

<div class="post-metadata">

**Author:** ![irfanshaikh](https://avatars.discourse-cdn.com/v4/letter/i/a183cd/32.png) [@irfanshaikh](https://devforum.zoom.us/u/irfanshaikh)\
**Post date:** [December 2, 2021, 12:44pm UTC](https://devforum.zoom.us/t/invalid-client-id-or-client-secret/5252/16 "2021-12-02T12:44:53Z")

</div>

Hello Tommy,  
I’m using post man for this, and I have also tried this on our application but got same error.  
Error : {  
“reason”: “Invalid client\_id or client\_secret”,  
“error”: “invalid\_client”  
}  
I have done all the below mention steps.  
Step 1:Got the code=obBEe8ewaL\_KdyNjniT4KPd8ffDWt9fGB in query parameter.  
Step 2: POST request on [zoombaseUrl]/oauth/token?code=0TSK33beUP\_n7fue5iHRaOv6Crm\_BlGGg&grant\_type=authorization\_code&redirect\_uri=https://oauth.pstmn.io/v1/callback  
WITH HEADERS  
Authorization:"Basic " ,  
Content-Type:“application/x-www-form-urlencoded”

To generate Authorization value I have followed all the steps mention ([https://marketplace.zoom.us/docs/guides/auth/oauth](https://marketplace.zoom.us/docs/guides/auth/oauth)) here I have included : between clientId and ClientSecret and then I have encoded them together with :,using [base64encode.org/](http://base64encode.org/),  
I have tried all the solutions mention on these page, please let me know what may be other possible reason for this problem.

---

<div class="post-metadata">

**Author:** ![frankfosters](https://avatars.discourse-cdn.com/v4/letter/f/94ad74/32.png) [@frankfosters](https://devforum.zoom.us/u/frankfosters)\
**Post date:** [December 2, 2021, 1:26pm UTC](https://devforum.zoom.us/t/invalid-client-id-or-client-secret/5252/17 "2021-12-02T13:26:46Z")

</div>

> [@Kadiri](#):
>
> The same issue I’m struggling with. I am trying to get OAuth app authorization working in C# code via authorization code flow. JWT app is quite simple and easy. I got it easily working. I got the authorization code but failed to get access token. POST url is like this. [https://zoom.us/oauth/token?code={authorizationCode}&grant\_type=authorization\_code&redirect\_uri=https://zoom.us](https://zoom.us/oauth/token?code=%7BauthorizationCode%7D&grant_type=authorization_code&redirect_uri=https://zoom.us)  
> The redirect\_uri is same as what’s registered with my app and white listed also. In the Authorization header I give “Bearer Base64(Client\_Id:Client\_Secret)” . For base64 encoding, I have used base64encode on [JannatAsia](https://jannatasia.com/) site, character set is UTF8, destination new line separator LF (Unix). I am on Windows 10. I don’t think LF (Unix) cause problem here. I get exact same error as OP. It’s not working in C# code and from postman also.

After what you type of changing your error gone? Can you help me out too?

---

<div class="post-metadata">

**Author:** ![will.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/will.zoom/32/14417_2.png) [@will.zoom](https://devforum.zoom.us/u/will.zoom)\
**Post date:** [December 6, 2021, 11:25am UTC](https://devforum.zoom.us/t/invalid-client-id-or-client-secret/5252/18 "2021-12-06T11:25:01Z")

</div>

Hey @irfanshaikh,

Have you double checked that the Client ID and Client Secret in your Authorization header matches that of your OAuth App? Additionally, if your app has both production and development credentials, make sure you’re specifying the same credentials as the instance of the app you authorized.

Thanks!

---

<div class="post-metadata">

**Author:** ![irfanshaikh](https://avatars.discourse-cdn.com/v4/letter/i/a183cd/32.png) [@irfanshaikh](https://devforum.zoom.us/u/irfanshaikh)\
**Post date:** [December 6, 2021, 1:24pm UTC](https://devforum.zoom.us/t/invalid-client-id-or-client-secret/5252/19 "2021-12-06T13:24:00Z")

</div>

Hi .

We have double check the Client ID and Client secret. We have follow all the steps in document. Try all the possible way.  
Currently we have only with development.

Waiting for solution.

---

<div class="post-metadata">

**Author:** ![will.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/will.zoom/32/14417_2.png) [@will.zoom](https://devforum.zoom.us/u/will.zoom)\
**Post date:** [December 7, 2021, 12:41pm UTC](https://devforum.zoom.us/t/invalid-client-id-or-client-secret/5252/20 "2021-12-07T12:41:35Z")

</div>

Hi @irfanshaikh,

Can you please share the full details of your request with us by opening up a request [here](https://support.zoom.us/hc/en-us/requests/new) (select the ‘developer’ product from the dropdown, after choosing Technical Support). Share the Client ID/Secret of your app, the Authorization header you’re passing, and the full request URL.

Thanks,  
Will

---

<div class="post-metadata">

**Author:** ![will.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/will.zoom/32/14417_2.png) [@will.zoom](https://devforum.zoom.us/u/will.zoom)\
**Post date:** [December 7, 2021, 12:41pm UTC](https://devforum.zoom.us/t/invalid-client-id-or-client-secret/5252/21 "2021-12-07T12:41:42Z")

</div>


