# Chatbots and geo fencing data

**URL:** <https://devforum.zoom.us/t/chatbots-and-geo-fencing-data/5450>\
**Category:** API and Webhooks\
**Created:** [August 12, 2019, 10:44pm UTC](https://devforum.zoom.us/t/chatbots-and-geo-fencing-data/5450 "2019-08-12T22:44:23Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![clippermadness](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/clippermadness/32/1039_2.png) [@clippermadness](https://devforum.zoom.us/u/clippermadness)\
**Post date:** [August 12, 2019, 10:44pm UTC](https://devforum.zoom.us/t/chatbots-and-geo-fencing-data/5450/1 "2019-08-12T22:44:23Z")

</div>

Hey Zoom Devs,

We’re creating a chat bot, which we intend to put through the marketplace app approval process and release to the public. However, we need some guidance on how to create a Zoom Chat Bot app that aligns with our product architecture.

We sell to regulated companies like financial institutions. They commonly have requirements that mandate data locality: i.e. all my data has to stay in the US or the UK or the EU. To meet that requirement, we have completely separate data centers that we deploy our customers into, with no shared components or infrastructure.

Accordingly, we’d like to have separate Zoom apps for each geo, so we can register geo specific callback endpoints. We will direct our customers to install the correct app based on their geo.

Our chat bot in Microsoft Teams works like this, so we’ve already successfully established the pattern with other platforms.

Will we need to go through the review, testing and security process for each one?

---

<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:** [August 12, 2019, 11:12pm UTC](https://devforum.zoom.us/t/chatbots-and-geo-fencing-data/5450/2 "2019-08-12T23:12:26Z")

</div>

Hey @clippermadness, thanks for reaching out, this is an interesting use case!

> [@clippermadness](#):
>
> Will we need to go through the review, testing and security process for each one?

I will ask our security / app approval team.

* * *

Although, I would suggest using the following flow to accomplish this:

Create 1 Chatbot App and on the “Information” page check the “Visit Site to Install” option.

 ![25%20PM](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/2X/d/de21eb65884d4342492a00b0978364d80dc0efe5.png)

When a user visits your Chatbot App on the Zoom App Marketplace, and clicks “Visit Site to Install”, they will be taken to a page you make that has a dropdown of your regions: US, UK, EU.

Once they choose a region, then install the Chatbot app by navigating the user to your “Publishable URL” (found on the “Submit” page) which starts the Zoom OAuth flow.

 ![55%20PM](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/2X/a/aa4ae17233b6fd61f02794fa0173f879533fb745.png)

On successful OAuth, save the region the user selected, the `access_token`, `refresh_token`, accountID, and or userID (found by JWT parsing the `access_token`) in your database.

When a user calls your Chatbot via the Bot Endpoint Url, [use their accountID/userID](https://marketplace.zoom.us/docs/guides/chatbots/sending-messages#receive) to lookup their region in your database and then based on the region, make calls to the respective data center.

OR,

You create 1 Chatbot App, check the “Install” from marketplace option on the “Information” page, and after successful install the user will land on your redirect url where you display the dropdown of regions for the user to select. Again, saving the region the user selected, the `access_token`, `refresh_token`, accountID, and or userID (found by JWT parsing the `access_token`) in your database.

When a user calls your Chatbot via the Bot Endpoint Url, [use their accountID/userID](https://marketplace.zoom.us/docs/guides/chatbots/sending-messages#receive) to lookup their region in your database and then based on the region, make calls to the respective data center.

* * *

A good example of this is the [Zoom Youtube App](https://marketplace.zoom.us/apps/WPKzwuoLQDuj_gPs68AQxw). You OAuth with Zoom, then the redirect url takes you to OAuth with Youtube to connect your Youtube account. In your case, instead of connecting your Youtube account, you would redirect to a page that displays the dropdown of regions, saving the region the user selects.

Let me know if this helps!

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![clippermadness](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/clippermadness/32/1039_2.png) [@clippermadness](https://devforum.zoom.us/u/clippermadness)\
**Post date:** [August 12, 2019, 11:57pm UTC](https://devforum.zoom.us/t/chatbots-and-geo-fencing-data/5450/3 "2019-08-12T23:57:43Z")

</div>

Thanks, Tommy. I understand your recommendations, but building that type of proxy capability is the kind of coupling that I’m trying to avoid.

Will the Zoom callbacks respond to a 302 redirect? Could I redirect them based on an account identifier?

---

<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:** [August 13, 2019, 4:11pm UTC](https://devforum.zoom.us/t/chatbots-and-geo-fencing-data/5450/4 "2019-08-13T16:11:24Z")

</div>

Hey @clippermadness, okay so I would go with multiple Marketplace Apps then.

> [@clippermadness](#):
>
> Will we need to go through the review, testing and security process for each one?

Answer from our security / app review team: “Yes they will be reviewed/tested on a per app basis, if everything is on point this should be pretty quick - a couple of days”

> [@clippermadness](#):
>
> Will the Zoom callbacks respond to a 302 redirect? Could I redirect them based on an account identifier?

Can you give me an example?

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![clippermadness](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/clippermadness/32/1039_2.png) [@clippermadness](https://devforum.zoom.us/u/clippermadness)\
**Post date:** [August 13, 2019, 4:44pm UTC](https://devforum.zoom.us/t/chatbots-and-geo-fencing-data/5450/5 "2019-08-13T16:44:26Z")

</div>

Re: apps = ok got it. We’ve gone through the process for other apps already, so I’m confident it will be realtively painless. 🙂

---

<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:** [August 13, 2019, 5:02pm UTC](https://devforum.zoom.us/t/chatbots-and-geo-fencing-data/5450/6 "2019-08-13T17:02:04Z")

</div>

Painless indeed 🙂

Let us know if you have any other questions!

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![clippermadness](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/clippermadness/32/1039_2.png) [@clippermadness](https://devforum.zoom.us/u/clippermadness)\
**Post date:** [August 13, 2019, 5:42pm UTC](https://devforum.zoom.us/t/chatbots-and-geo-fencing-data/5450/7 "2019-08-13T17:42:44Z")

</div>

Just to follow up on the redirects topic, which is continuing down the possible path of “one app, route callbacks based on account id”:

When the Zoom infrastructure issues the callback, can my endpoint return a redirect (probably a 307 temporary redirect), and will the Zoom callback infrastructure actually respect the redirect and call the endpoint I redirect to? Or would I have to proxy the call and forward the request myself?

---

<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:** [August 13, 2019, 6:23pm UTC](https://devforum.zoom.us/t/chatbots-and-geo-fencing-data/5450/8 "2019-08-13T18:23:01Z")

</div>

Hey @clippermadness, thanks for more details.

When you say “callback” are you talking about the Redirect URL (on the App Credentials page),

![35%20PM](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/2X/f/fe446f9b3ecc6c340f8f887ec48a57325e4f86c8.png)

or the Bot Endpoint URL (on the Features page)?

![54%20PM](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/2X/9/9de4bf3cfb7d6e22f26caaf101bd327ffe9de1d1.png)

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![clippermadness](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/clippermadness/32/1039_2.png) [@clippermadness](https://devforum.zoom.us/u/clippermadness)\
**Post date:** [August 13, 2019, 6:50pm UTC](https://devforum.zoom.us/t/chatbots-and-geo-fencing-data/5450/9 "2019-08-13T18:50:59Z")

</div>

The bot endpoint URL

---

<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:** [August 13, 2019, 7:26pm UTC](https://devforum.zoom.us/t/chatbots-and-geo-fencing-data/5450/10 "2019-08-13T19:26:29Z")

</div>

Hey @clippermadness,

I just tested by creating a redirect (301) for my Bot Endpoint URL using [https://bitly.com/](https://bitly.com/) and it did not work.

> [@clippermadness](#):
>
> Or would I have to proxy the call and forward the request myself?

^ Yes. To have 1 Zoom Marketplace App you will have to handle with your own code/server.

-Tommy

---

<div class="post-metadata">

**Author:** ![clippermadness](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/clippermadness/32/1039_2.png) [@clippermadness](https://devforum.zoom.us/u/clippermadness)\
**Post date:** [August 13, 2019, 7:41pm UTC](https://devforum.zoom.us/t/chatbots-and-geo-fencing-data/5450/11 "2019-08-13T19:41:56Z")

</div>

Thanks Tommy. This is very helpful info and I appreciate the timely responses.

---

<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:** [August 13, 2019, 8:07pm UTC](https://devforum.zoom.us/t/chatbots-and-geo-fencing-data/5450/12 "2019-08-13T20:07:14Z")

</div>

You are welcome! Happy to help!

Let us know if you have any other questions!

Thanks,  
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, 6:38pm UTC](https://devforum.zoom.us/t/chatbots-and-geo-fencing-data/5450/13 "2020-08-21T18:38:41Z")

</div>

Closed on August 21, 2020, 6:38pm UTC


