Testing Zoom integration VS localhost

Use host file to test Zoom integration locally

Ronny Roeller
NEXT Engineering
2 min readAug 1, 2023

--

When developing applications that integrate with Zoom’s APIs, a recurring challenge is testing the authentication flow locally. In this post, we’ll take a closer look at one of the common obstacles: Zoom’s policy against using localhost as a redirect URL. We’ll also explore a practical workaround that allows you to continue developing and testing locally.

Challenge: Zoom doesn’t like localhost

Developers often find it convenient to test their applications locally using localhost. However, Zoom’s OAuth 2.0 implementation restricts redirecting to localhost, which poses a significant challenge. The inability to define a localhost redirect URL makes it cumbersome to test the application parts of your code that interact with Zoom, resulting in slowed development progress.

Solution: Define custom domain in host file

Thankfully, there’s a method to bypass this restriction, allowing you to test the Zoom OAuth flow locally. Here’s how you can do it:

Update the Host File

  1. Open in your terminal the file /etc/hosts (MacOS) by executing sudo vi /etc/hosts
  2. Add the line 127.0.0.1 yourapp.localhost
  3. Test that the connection works

Note: You might have to flush your local DNS cache with sudo killall -HUP mDNSResponder

Define a Valid Zoom Redirect URL

  1. Go to the Zoom App Marketplace and navigate to your App settings.
  2. Under the “Redirect URL for OAuth” field, define the domain as http://yourapp.local, including the required port, e.g. http://yourapp.local:8080.
    Remember to use `http` instead of `https`, as local SSL certificates might cause additional complications.

Testing the OAuth Flow

  1. Open a browser and navigate to http://yourapp.local:8080
  2. Trigger the Zoom OAuth flow, using a redirect URL pointing to http://yourapp.local:8080.

You should now be able to proceed through the OAuth flow as if you were on a live environment.

Happy coding!

--

--

Ronny Roeller
NEXT Engineering

CTO at nextapp.co # Product discovery platform for high performing teams that bring their customers into every decision