Skip to main content

Setting a Localhost URL as an OAuth Redirect URI


ByrneReese
Community Manager
Forum|alt.badge.img+3

Can I set http://localhost/ringcentral/index.php as my OAuth Redirect URI?

I am using the following authorization flows:

  • Authorization Code

  • Refresh Access Token

I do not have a live, publicly accessible URL for my OAuth Redirect URI. How can I complete the OAuth process?

Answer:

Yes, you can set a Redirect URI to your localhost. Since OAuth redirects are processed by your browser, which has access to localhost, this setup works for local development.

However, if your application uses webhook subscriptions, you will need a publicly accessible URL to receive event notifications. The recommended approach is to use a reverse proxy to expose a public URL that tunnels requests to your localhost application.

Recommended Solution:

We recommend using ngrok, a widely used reverse proxy tool among developers. Ngrok provides a temporary public URL that securely routes requests to your local environment, allowing webhook events to reach your application.

By using this approach, you can successfully complete OAuth authentication and handle webhook events in a local development environment.

 

Did this thread help you find an answer to your question?

0 replies

Be the first to reply!

Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings