# Problem with Oauth token, {"code":200,"message":"Invalid api key or secret."}

**URL:** <https://devforum.zoom.us/t/problem-with-oauth-token-code-200-message-invalid-api-key-or-secret/4995>\
**Category:** API and Webhooks\
**Created:** [July 12, 2019, 11:44am UTC](https://devforum.zoom.us/t/problem-with-oauth-token-code-200-message-invalid-api-key-or-secret/4995 "2019-07-12T11:44:22Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![danieluk.alan](https://avatars.discourse-cdn.com/v4/letter/d/9d8465/32.png) [@danieluk.alan](https://devforum.zoom.us/u/danieluk.alan)\
**Post date:** [July 12, 2019, 11:44am UTC](https://devforum.zoom.us/t/problem-with-oauth-token-code-200-message-invalid-api-key-or-secret/4995/1 "2019-07-12T11:44:22Z")

</div>

Hello,  
I have strange problem. Im using ServiceNow and need to get all meetings from few accounts. Problem is the token i get in response seems to be invalid {“code”:200,“message”:“Invalid api key or secret.”} (this i get in response after GET meetings method). I saw the problem appear when i use grant-type “client credentials” if I change it to grant-type “authorization code” token seems to be fine and in response i get the meetings. But i would like to use client credentials to skip passing zoom account credentials to generate token like on authorization code.

---

<div class="post-metadata">

**Author:** ![ojus.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/ojus.zoom/32/734_2.png) [@ojus.zoom](https://devforum.zoom.us/u/ojus.zoom)\
**Post date:** [July 12, 2019, 10:58pm UTC](https://devforum.zoom.us/t/problem-with-oauth-token-code-200-message-invalid-api-key-or-secret/4995/2 "2019-07-12T22:58:43Z")

</div>

Hi @danieluk.alan ,

Can you explain your use case in details, so that we can understand why you need to generate the token in a specific manner?

Thanks

---

<div class="post-metadata">

**Author:** ![danieluk.alan](https://avatars.discourse-cdn.com/v4/letter/d/9d8465/32.png) [@danieluk.alan](https://devforum.zoom.us/u/danieluk.alan)\
**Post date:** [July 15, 2019, 7:37am UTC](https://devforum.zoom.us/t/problem-with-oauth-token-code-200-message-invalid-api-key-or-secret/4995/3 "2019-07-15T07:37:24Z")

</div>

My goal is integrate few zoom accounts (3 will be 5) to get all meetings from them on one calender. Also there will be option to create new meeting based on balancing algorithm counting meetings load per account to switch on which one should it be created. Our point is that we have few meetings in company in same time, everyone has access to account to book meeting, so would be nice to generate token without pasting credentials per account, and let ServiceNow platform do that for us, same as refreshing token. We cant make it automatically because if we generate token with “Oauth authorization code” we need pass credentials, and if we generate token with method “Oauth client credentials” we get that “Invalid api key or secret”.

---

<div class="post-metadata">

**Author:** ![ojus.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/ojus.zoom/32/734_2.png) [@ojus.zoom](https://devforum.zoom.us/u/ojus.zoom)\
**Post date:** [July 16, 2019, 10:32pm UTC](https://devforum.zoom.us/t/problem-with-oauth-token-code-200-message-invalid-api-key-or-secret/4995/5 "2019-07-16T22:32:48Z")

</div>

Hi @danieluk.alan,

are you using the ServiceNow App from the zoom marketplace?

> [@danieluk.alan](#):
>
> i get in response seems to be invalid {“code”:200,“message”:“Invalid api key or secret.”} (this i get in response after GET meetings method)

About the response, are you getting this from Service Now or us?

---

<div class="post-metadata">

**Author:** ![danieluk.alan](https://avatars.discourse-cdn.com/v4/letter/d/9d8465/32.png) [@danieluk.alan](https://devforum.zoom.us/u/danieluk.alan)\
**Post date:** [July 17, 2019, 6:45am UTC](https://devforum.zoom.us/t/problem-with-oauth-token-code-200-message-invalid-api-key-or-secret/4995/6 "2019-07-17T06:45:40Z")

</div>

No i just build an app to generate client ID and client secret. It happens also in postman not only Servicenow, i generated token with postman using client credentials. Then i used this token for GET method in postman and response is the same.

---

<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 17, 2019, 9:24pm UTC](https://devforum.zoom.us/t/problem-with-oauth-token-code-200-message-invalid-api-key-or-secret/4995/7 "2019-07-17T21:24:43Z")

</div>

Hey @danieluk.alan,

You must use the [authorization code grant type](https://marketplace.zoom.us/docs/guides/authorization/oauth/oauth-with-zoom) to call most Zoom API’s.

[The client credentials grant type is for authorizing Chatbots to send messages.](https://marketplace.zoom.us/docs/guides/chatbots/authorization#access-tokens)

To provide you with a better answer about your specific use case, are you wanting to create one Account-Level App to manage your Zoom sub accounts?

Or do you want accounts outside/seperate from your Zoom account to use this?

Thanks,  
Tommy
