# In-client OAuth (\`authorize\` API) is not silent

**URL:** <https://devforum.zoom.us/t/in-client-oauth-authorize-api-is-not-silent/125029>\
**Category:** Zoom Apps\
**Created:** [January 21, 2025, 4:40pm UTC](https://devforum.zoom.us/t/in-client-oauth-authorize-api-is-not-silent/125029 "2025-01-21T16:40:21Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![tkishkin](https://avatars.discourse-cdn.com/v4/letter/t/57b2e6/32.png) [@tkishkin](https://devforum.zoom.us/u/tkishkin)\
**Post date:** [January 21, 2025, 4:40pm UTC](https://devforum.zoom.us/t/in-client-oauth-authorize-api-is-not-silent/125029/1 "2025-01-21T16:40:21Z")

</div>

**Please note** : this topic is similar to [“Trouble using in-client OAuth silently (`authorize` API)”](https://devforum.zoom.us/t/trouble-using-in-client-oauth-silently-authorize-api/77634), however the solution from there didn’t work for me (or I misunderstood it). I posted a comment there with the details.

**Zoom Apps Configuration**  
Our [app](https://marketplace.zoom.us/apps/M8gb79vBRQ-3nqVKFuwMrg) is running on node.js backend and a combination of VanillaJS/AngularJS/React microfrontends.

**Description**  
Our app is published and is working fine, but currently it only supports browser-based installation. We are trying to add In-Client OAuth support for better user experience. We followed the [documentation](https://developers.zoom.us/docs/zoom-apps/authentication/), and now I’m following the instruction for [testing the in-client auth by single user](https://developers.zoom.us/docs/zoom-apps/authentication/#testing-adding-apps-during-development): share the app in meeting, remove the app, accept the app invite in the meeting chat. After that, the following happens:

1. I see the app Marketplace listing, where I press the _Add_ button;
2. I see the in-client consent screen, where I press the _Allow_ button;
3. App’s home screen is rendered. In the client code, I can see that the user’s state is `authorized`. However I don’t have the user’s Access Token yet, so I suggest the user to authorize the app, similar to the [zoomapps-advancedsample-react](https://github.com/zoom/zoomapps-advancedsample-react) sample. So I call the `authorize` SDK method.
4. In-client consent screen is shown again. **User has to allow the access to the scopes once more.**

This second consent screen is unexpected: according to [documentation](https://appssdk.zoom.us/classes/ZoomSdk.ZoomSdk.html#authorize), the `authorize` should be silent unless scopes are changed. And it’s a nuisance to the user to have to provide consent twice.

After that, the auth process can be finished without further issues.

**Error?**  
There is no error message, but the necessity to provide consent twice is unexpected and deteriorates user’s experience.

**Question**  
Is it a bug, or is my in-client auth sequence wrong?

**How To Reproduce**  
Reproduced by enabling In-Client Auth and testing it following the [instruction](https://developers.zoom.us/docs/zoom-apps/authentication/#testing-adding-apps-during-development). More details in the _Description_ section above.

**Zoom client version** : 6.3.6 (56144) on Windows.

**Note** : for testing in-client auth, I temporarily disabled Guest Mode in the app.

---

<div class="post-metadata">

**Author:** ![donte.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/donte.zoom/32/24412_2.png) [@donte.zoom](https://devforum.zoom.us/u/donte.zoom)\
**Post date:** [January 24, 2025, 1:41am UTC](https://devforum.zoom.us/t/in-client-oauth-authorize-api-is-not-silent/125029/3 "2025-01-24T01:41:19Z")

</div>

> [@tkishkin](#):
>
> App’s home screen is rendered. In the client code, I can see that the user’s state is `authorized`. However I don’t have the user’s Access Token yet, so I suggest the user to authorize the app, similar to the [zoomapps-advancedsample-react](https://github.com/zoom/zoomapps-advancedsample-react) sample. So I call the `authorize` SDK method.

Thank you for posting the Zoom Developer Forum @tkishkin, It looks like you are calling the authorize method. Instead, can you try calling the promptAuthorize method when the user status is authorized?

> **[ZoomSdk | @zoom/appssdk - v0.16.25](https://appssdk.zoom.us/classes/ZoomSdk.ZoomSdk.html#promptAuthorize)**
>
> Documentation for @zoom/appssdk - v0.16.25

> <https://github.com/zoom/zoomapps-advancedsample-react/blob/1d1943c4f812264ce9005aa8e7cb4b1d52fb7bfc/frontend/src/components/Authorization.js#L24>

---

<div class="post-metadata">

**Author:** ![tkishkin](https://avatars.discourse-cdn.com/v4/letter/t/57b2e6/32.png) [@tkishkin](https://devforum.zoom.us/u/tkishkin)\
**Post date:** [January 24, 2025, 11:24am UTC](https://devforum.zoom.us/t/in-client-oauth-authorize-api-is-not-silent/125029/4 "2025-01-24T11:24:51Z")

</div>

Hi @donte.zoom , thank you for the reply!

I’ve just tried calling the await `promptAuthorize()` method instead of `authorize()`, but it failed with the following error: `zoom-apps-js-sdk.js?v=638705687161800000:135 Uncaught Error: No Permission for this API. [code:80010, reason:disabled_for_installed_apps]`.

Which in my opinion make sense, as in the [documentation](https://developers.zoom.us/docs/zoom-apps/guides/guest-mode/#elevating-the-app-experience) it’s recommended to use `promptAuthorize()` in Guest Mode, i.e. when the app is not added by user (user’s state is `unauthenticated` or `authenticated`). In my case the state is already `authorized`, so `authorize()` is to be used (I see the same logic in the _zoomapps-advancedsample-react_ sample that you linked).

What else could I try?

---

<div class="post-metadata">

**Author:** ![donte.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/donte.zoom/32/24412_2.png) [@donte.zoom](https://devforum.zoom.us/u/donte.zoom)\
**Post date:** [January 24, 2025, 11:35pm UTC](https://devforum.zoom.us/t/in-client-oauth-authorize-api-is-not-silent/125029/5 "2025-01-24T23:35:50Z")

</div>

Thanks for testing this. Could you share the code that handles the call to the authorize method? Also, please show the userContext printed to console at the time the call is made. I’d like to compare your implementation with mine.

---

<div class="post-metadata">

**Author:** ![tkishkin](https://avatars.discourse-cdn.com/v4/letter/t/57b2e6/32.png) [@tkishkin](https://devforum.zoom.us/u/tkishkin)\
**Post date:** [January 28, 2025, 3:56pm UTC](https://devforum.zoom.us/t/in-client-oauth-authorize-api-is-not-silent/125029/6 "2025-01-28T15:56:13Z")

</div>

Hi @donte.zoom ,

I’ve created a simplified version of the Zoom app in a single page to demonstrate the code I use to authorize. You can see it in [this gist](https://gist.github.com/timkishkin/4b4b80427f77fe5a09071aa331324673).  
The only dependencies of this page are:

- Zoom SDK;
- [pkceChallenge.js](https://gist.github.com/timkishkin/3ec303b875259e3835fb7042186a3772);
- our backend ([https://zoomapp.staging-linkando.com/zoomapp](https://zoomapp.staging-linkando.com/zoomapp)).

[Here’s a video](https://youtu.be/q-J3L-AcRGo) where I demonstrate the userContext before calling the authorize.

I hope it helps to understand the issue. Please let me know if any additional context is needed. Thanks!

---

<div class="post-metadata">

**Author:** ![tkishkin](https://avatars.discourse-cdn.com/v4/letter/t/57b2e6/32.png) [@tkishkin](https://devforum.zoom.us/u/tkishkin)\
**Post date:** [February 12, 2025, 11:51am UTC](https://devforum.zoom.us/t/in-client-oauth-authorize-api-is-not-silent/125029/8 "2025-02-12T11:51:50Z")

</div>

Hi @donte.zoom , as I already mentioned in the community forum, a fix was found thanks to your suggestion. All I had to do was to add under _“OAuth Allow Lists”_ the URL of the page from which the `zoomSdk.authorize` call was being made. In my case, `https://zoom-cross-tenant.staging-linkando.com/zoomapp`.

Indeed, the [documentation](https://developers.zoom.us/docs/zoom-apps/authentication/#enabling-in-client-oauth-for-your-app) mentiones: "_under the OAuth allow list section, add your app’s Home URL"_. The confusion in my case was due to the fact that my home URL redirects the user further to another subdomain, and only after that the `zoomSdk.authorize` is called. Maybe it’s worth rewording the documentation slightly to avoid such confusions.

Another adjustment I had to do was to send the current page URL (again, `.../zoomapp`) as `redirect_uri` when requesting `https://zoom.us/oauth/token` from the server. Initially I used to send my main _OAuth Redirect URL_ like in in-browser auth, which led to `invalid_grant` error. Similar to [this issue in another user’s forum post](https://devforum.zoom.us/t/trouble-using-in-client-oauth-silently-authorize-api/77634/8).

Thanks for the support @donte.zoom !
