Where do I define Authorized URIs in a Sandbox account?

I am following this documentation Create grants with OAuth and an API key | Nylas Docs

Apparently, it mentions that I should define my authorized URI in the dashboard. I can’t find this setting anywhere except the hosted authentication section which didn’t work for me.

And if I use a localhost:3000 based URL in the authorized URI query params then it fails with Status 701.

Here’s the URI for example:
https://api.us.nylas.com/v3/connect/auth?access_type=online&client_id=34c31c5c-e83f-4064-803f-c60f3ce7ce9d&provider=google&redirect_uri=http%3A%2F%2Flocalhost%3A3000%2Foauth%2Fcallback&response_type=code

Any help would be appreciated :slight_smile:

Hi @souravchandra, for configuring hosted authentication for a sandbox account, can you share the URL that you are using? It should be as follows: http://localhost:3000/oauth/callback

Ensure http://localhost:3000/oauth/callback is the endpoint that receives the callback and exchanges the token for the access code.

I still see this error:

I have the same callback URL registered as well:

Nevermind, I realized that region in the URL needs to be eu because the sandbox account is located in the EU. The error message on the page could’ve been better :smiley:

All good now. Thanks!

1 Like