# Using OAuth auth code flow on mobile and web app

**URL:** <https://devforum.zoom.us/t/using-oauth-auth-code-flow-on-mobile-and-web-app/16170>\
**Category:** API and Webhooks\
**Created:** [May 5, 2020, 9:17am UTC](https://devforum.zoom.us/t/using-oauth-auth-code-flow-on-mobile-and-web-app/16170 "2020-05-05T09:17:12Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![artur.albov](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/artur.albov/32/4120_2.png) [@artur.albov](https://devforum.zoom.us/u/artur.albov)\
**Post date:** [May 5, 2020, 9:17am UTC](https://devforum.zoom.us/t/using-oauth-auth-code-flow-on-mobile-and-web-app/16170/1 "2020-05-05T09:17:12Z")

</div>

**Description**  
Hello,  
We’re developing app that uses zoom oAuth and calls zoom API from our backend server on-behalf of user. User should be prompted for authentication in our client app (our SPA web, Android or iOS application) and then our server should receive access and refresh tokens of user. One way to do this is to implement auth code flow where after client receiving auth code we send it to our backend server and server exchanging auth code for tokens. Is this valid approach? And if it is, how to implement it on mobile platforms? Cause there is no ability to use different redirect URIs for mobile.

Thank you!

---

<div class="post-metadata">

**Author:** ![michael.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/michael.zoom/32/37213_2.png) [@michael.zoom](https://devforum.zoom.us/u/michael.zoom)\
**Post date:** [May 8, 2020, 5:48pm UTC](https://devforum.zoom.us/t/using-oauth-auth-code-flow-on-mobile-and-web-app/16170/2 "2020-05-08T17:48:06Z")

</div>

Hi @artur.albov, yes this would be a valid flow. The user needs to be able to access the Zoom OAuth/authorization page, then will need to be sent to the Redirect URL with the code param – from which they can then be directed back into your app.

---

<div class="post-metadata">

**Author:** ![artur.albov](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/artur.albov/32/4120_2.png) [@artur.albov](https://devforum.zoom.us/u/artur.albov)\
**Post date:** [May 8, 2020, 7:54pm UTC](https://devforum.zoom.us/t/using-oauth-auth-code-flow-on-mobile-and-web-app/16170/3 "2020-05-08T19:54:02Z")

</div>

Hi @michael.zoom,  
Thank you for your response!  
As far as I understand, I should use [https://myapp.example.com](https://myapp.example.com) deeplink for redirects on mobile platforms? (I can’t find any ability to add multiply redirect URLs in app configuration. And redirect URL can’t use custom scheme)

---

<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:** [May 13, 2020, 10:30pm UTC](https://devforum.zoom.us/t/using-oauth-auth-code-flow-on-mobile-and-web-app/16170/4 "2020-05-13T22:30:08Z")

</div>

Hey @artur.albov,

OAuth apps do support multiple redirect urls, see my post here:

> [@Does zoom support more than two environments for oauth2?](https://devforum.zoom.us/t/does-zoom-support-more-than-two-environments-for-oauth2/11052/12):
>
> Hey @tuancode, @michael.solomon, This is totally possible! slight_smile Let me walk you through how to do this with the base domain of example.com For your whitelist, simply add your base domain: https://example.com Then in your dev/prod redirect url field, add a default redirect, https://any.example.com (this will be programmatically overridden to the correct sub domain, continue reading below) Now, with your install URL ([the url mentioned in Step 1. of the OAuth guide](https://marketplace.zoom.us/docs/guides/auth/oauth#getting-access-token)) in your code, dyna…

For deep links, you can redirect the user back to your app using a deeplink once they land on the redirect url.

Let me know if that helps!

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![artur.albov](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/artur.albov/32/4120_2.png) [@artur.albov](https://devforum.zoom.us/u/artur.albov)\
**Post date:** [May 14, 2020, 8:45am UTC](https://devforum.zoom.us/t/using-oauth-auth-code-flow-on-mobile-and-web-app/16170/5 "2020-05-14T08:45:46Z")

</div>

Hi @tommy, thanks for info!

---

<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:** [May 19, 2020, 3:59pm UTC](https://devforum.zoom.us/t/using-oauth-auth-code-flow-on-mobile-and-web-app/16170/6 "2020-05-19T15:59:46Z")

</div>

Happy to help! 🙂

-Tommy

---

<div class="post-metadata">

**Author:** ![DeveloperBot](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/developerbot/32/12632_2.png) [@DeveloperBot](https://devforum.zoom.us/u/DeveloperBot)\
**Post date:** [August 21, 2020, 9:24pm UTC](https://devforum.zoom.us/t/using-oauth-auth-code-flow-on-mobile-and-web-app/16170/7 "2020-08-21T21:24:42Z")

</div>

Closed on August 21, 2020, 9:24pm UTC


