error 400_redirect_uri_mismatch

48 views
Skip to first unread message

Le pirate noir

unread,
Feb 3, 2025, 3:33:57 PMFeb 3
to Google Apps Script Community
Hi, 

I have been struggling for weeks trying to open Drive picker on web app but i keep getting the same error : 400 redirect_uri_mismatch. 

Note : I use live server on visual studio to open the html file.


error 400.png
As the error says : redirect_uri_mismatch. I guess the error comes frome here... Is there someone here who knows how to fix this please ?
id.png
Thank you !


Sameer Goyal

unread,
Feb 4, 2025, 12:00:09 AMFeb 4
to Google Apps Script Community
Hi, 

Please try without mentioning http:// so final uri may look like 127.0.0.1 and also make sure you are requesting to google using 127.0.0.1 not by localhost it will also trigger same error even you are using same port.

Thanks!

Sameer Goyal

unread,
Feb 4, 2025, 12:04:50 AMFeb 4
to Google Apps Script Community
You can also refer to this https://www.youtube.com/watch?v=QHz1Rs6lZHQ&t=2s. It may help

Le pirate noir

unread,
Feb 4, 2025, 10:00:31 AMFeb 4
to Google Apps Script Community
Hi Sameer, 

Thx for helping me. I tried your solution but unfortunately not working... I can't put the uri without mentionning http://

Also, can you tell me, in the URI redirected section, do i have to put 

picker1.png

Here is what i get when i open this snippet on github with Live server (visual studio). In the redirected URI, i tried to write it with the .html at the end (http://127.0.0.1:5500/Picker.html)  and without  (http://127.0.0.1:5500/Picker) but I still get the same error. I really don't know what to do to fix this...
screen.png

Reply all
Reply to author
Forward
0 new messages