# Test BOT Locally : BOT - "Invalid client error" while fetching "Bearer token"

**URL:** <https://devforum.zoom.us/t/test-bot-locally-bot-invalid-client-error-while-fetching-bearer-token/59311>\
**Category:** API and Webhooks\
**Created:** [October 25, 2021, 6:54am UTC](https://devforum.zoom.us/t/test-bot-locally-bot-invalid-client-error-while-fetching-bearer-token/59311 "2021-10-25T06:54:15Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mythili](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/mythili/32/31137_2.png) [@Mythili](https://devforum.zoom.us/u/Mythili)\
**Post date:** [October 25, 2021, 6:54am UTC](https://devforum.zoom.us/t/test-bot-locally-bot-invalid-client-error-while-fetching-bearer-token/59311/1 "2021-10-25T06:54:15Z")

</div>

## Using this template helps us debug your issues more effectively 🙂

**Description**  
Team, Our usecase is to send alerts/notification messages to different zoom channels from our Java Application. So, I decided to go with “Chatbot” option based on my last discussion on this forum. Hence, I created a chatbot in the marketplace only in “DEV environment” for testing.  
**Important Configuration Details :**  
Redirect URL:[https://marketplace.zoom.us](https://marketplace.zoom.us)  
Endpoint URL - [https://zoom.us/](https://zoom.us/). ( Gave this URL as our chatbot should support only one-way  
communication, We dont want to support customers reaching the bot)  
Scopes:

1. Enable Chatbot within Zoom Chat Client/imchat:bot
2. Send a chat message to a Zoom Chat user or channel on behalf of a Chatbot

**Error**

1. I tried using “DEV” credentials (Base64 encoding) to get the bearer token , by referring - [https://marketplace.zoom.us/docs/api-reference/zoom-api/chatbot-messages/sendchatbot](https://marketplace.zoom.us/docs/api-reference/zoom-api/chatbot-messages/sendchatbot)  
But , I get the error “Invalid client\_id or client\_secret”. what could be reason?
2. As I mentioned above , My BOT is going to be a one-way communication. i.e. Only BOT can post message on zoom channels. Users shouldn’t contact BOT. In this case , Is it still needed to to mention the valid End-point URL for BOT? can it be any dummy URL?

**Which App Type (OAuth / Chatbot / JWT / Webhook)?**  
Chatbot

**Which Endpoint/s?**

---

<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:** [October 27, 2021, 12:07pm UTC](https://devforum.zoom.us/t/test-bot-locally-bot-invalid-client-error-while-fetching-bearer-token/59311/2 "2021-10-27T12:07:27Z")

</div>

Hi @Mythili,

Thanks for reaching out about this—happy to help.

This invalid client\_id error typically means there’s an issue with the value you’re passing in your Authorization header. Your Chatbot should have both a Dev and Prod Client ID/Secret pair. Can you confirm you’ve authorized the dev version and are passing the dev client id and secret in your auth header?

Thanks,  
Will

---

<div class="post-metadata">

**Author:** ![Mythili](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/mythili/32/31137_2.png) [@Mythili](https://devforum.zoom.us/u/Mythili)\
**Post date:** [October 27, 2021, 7:39pm UTC](https://devforum.zoom.us/t/test-bot-locally-bot-invalid-client-error-while-fetching-bearer-token/59311/3 "2021-10-27T19:39:04Z")

</div>

@will ,

Hi Thanks for the reply.

Please refer the attached snapshots. I ensure that I did Base64-encoding of DEV credentials (clientid:secret) for authorization.  
. If needed I shall share the details of my BOT and credentials in private. Could you please help?

 ![Screenshot 2021-10-28 at 1.05.40 AM](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/7/d/7df89ef118b5bddca72dae3d10977d0341e1f814.png)  
 ![Screenshot 2021-10-28 at 1.05.59 AM](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/b/b/bba58eaee1d027646e25e3159ef691b47e7be596.png)

---

<div class="post-metadata">

**Author:** ![Mythili](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/mythili/32/31137_2.png) [@Mythili](https://devforum.zoom.us/u/Mythili)\
**Post date:** [October 28, 2021, 6:34am UTC](https://devforum.zoom.us/t/test-bot-locally-bot-invalid-client-error-while-fetching-bearer-token/59311/4 "2021-10-28T06:34:41Z")

</div>

@ Will,

As of now , I haven’t submitted by “BOT” yet (as I dont want to publish to all customers of zoom).  
I have progressed only till “Test locally” and “installed” the BOT and testing it. Does the Authorization work only after clicking on “Submit” at the last page?

---

<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:** [October 29, 2021, 9:54am UTC](https://devforum.zoom.us/t/test-bot-locally-bot-invalid-client-error-while-fetching-bearer-token/59311/5 "2021-10-29T09:54:24Z")

</div>

Hi @Mythili,

The install URL from the **Local Test** section of your app allows you to install the bot under any user in your Zoom account (the account under which the bot was created in). If you need to use/test the bot outside of your account, you would need to click ‘Submit’ and have the bot reviewed by our Marketplace team.

Let me know if this helps to clarify—thanks!  
Will

---

<div class="post-metadata">

**Author:** ![Mythili](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/mythili/32/31137_2.png) [@Mythili](https://devforum.zoom.us/u/Mythili)\
**Post date:** [October 29, 2021, 6:13pm UTC](https://devforum.zoom.us/t/test-bot-locally-bot-invalid-client-error-while-fetching-bearer-token/59311/6 "2021-10-29T18:13:58Z")

</div>

@will.zoom ,

Thanks.  
I have installed the BOT through “Local Test” in my account (with which I created BOT ) . Now I want to post messages to myself/channel through this BOT and for that purpose am trying to authorise the BOT using my DEV credentials to get the bearer token , by referring to  
([https://marketplace.zoom.us/docs/guides/chatbots/installation-and-authentication#requesting-a-chatbot-token](https://marketplace.zoom.us/docs/guides/chatbots/installation-and-authentication#requesting-a-chatbot-token) ) . Will this work ? or “Submit” is needed even for DEV Testing of BOT?

---

<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 1, 2021, 11:21am UTC](https://devforum.zoom.us/t/test-bot-locally-bot-invalid-client-error-while-fetching-bearer-token/59311/7 "2021-11-01T11:21:23Z")

</div>

Hi @Mythili,

Yes, you can test locally with the dev instance of your bot—this is supported as long as the users you’re testing with belong to the same account as your dev bot. The submission would not be required for this.

Thanks!  
Will

---

<div class="post-metadata">

**Author:** ![Mythili](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/mythili/32/31137_2.png) [@Mythili](https://devforum.zoom.us/u/Mythili)\
**Post date:** [November 1, 2021, 4:16pm UTC](https://devforum.zoom.us/t/test-bot-locally-bot-invalid-client-error-while-fetching-bearer-token/59311/8 "2021-11-01T16:16:36Z")

</div>

@will.zoom ,

Thanks for the reply. I have raised a ticket for this issue - [https://support.zoom.us/hc/en-us/requests/12638982](https://support.zoom.us/hc/en-us/requests/12638982) . I have shared the credentials and other details in the ticket. I also have another thread with the discussion on same issue - [Use JWT App to post message on the Zoom channels - #10 by Mythili](https://devforum.zoom.us/t/use-jwt-app-to-post-message-on-the-zoom-channels/57569/10) . Could you please help on the ticket?

---

<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 2, 2021, 10:27am UTC](https://devforum.zoom.us/t/test-bot-locally-bot-invalid-client-error-while-fetching-bearer-token/59311/9 "2021-11-02T10:27:37Z")

</div>

Thanks @Mythili, a member of our team will be in touch shortly.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/6/1/614bdd549b610bbaa46ff934617683a02bdaa03c.png) [@system](https://devforum.zoom.us/u/system)\
**Post date:** [December 2, 2021, 8:28pm UTC](https://devforum.zoom.us/t/test-bot-locally-bot-invalid-client-error-while-fetching-bearer-token/59311/10 "2021-12-02T20:28:12Z")

</div>

Closed on December 2, 2021, 8:28pm UTC

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