Running into error with Redirect URI for Gmail tool

Hi all,

I’m trying to run the example Gmail tool script, but running into an error with the redirect URI.

I’ve added the GOOGLE_CLIENT_ID, GOOGLE_CLIENT_SECRET, GOOGLE_PROJECT_ID, and GOOGLE_REDIRECT_URI=http://localhost to my .env file.

When I go to run the script, it brings me to the following page stating that the redirect URI does not match. If I run this script multiple times, the port number changes each time which means that I’m unable to add it as a registered Redirect URI on the GCP page and wildcards are unable to be added there as well.

I’d appreciate some help on this issue, thanks!

Hi
Thanks for reaching out and for using Agno! I’ve looped in the right engineers to help with your question. We usually respond within 24 hours, but if this is urgent, just let us know, and we’ll do our best to prioritize it.
Appreciate your patience—we’ll get back to you soon! :smile:

Hello, this seems to be a mismatch issue. Please make sure your Google Console is configured properly. This is a very common issue with Gmail setup and is most likely always a configuration problem.

@kael Did you find a resolution to this? I’m running into the same issue and the response you received didn’t really provide any help to me.

Hey can you please send me and help me with how does your GOOGLE_REDIRECT_URI look like in console as well as env?

Please check this thread out - and ensure this is correct: Re: Getting error redirect_uri_mismatch when using... - Google Cloud Community