Hey everyone,
I’m having a really frustrating time trying to create an OAuth 2.0 Client ID for my Apps Script web app. Basically, I’m building a simple tool that uses the Google Tasks API to automatically create a 90-day plan. Super useful, right?
But I keep running into this weird “Invalid origin: URI must not contain a path or end with ‘/’” error when I try to set up the Authorized JavaScript origins. Here’s the catch – my origin URL does end with a forward slash, just like it’s supposed to!
I’ve tried everything I can think of:
- Double-checked my deployment ID (it’s correct!).
- Cleared my browser cache and cookies.
- Tried different browsers (Chrome, Firefox, Edge).
- Even created a brand new GCP project and Google account.
- I have tryed to change the GCP region.
- I have tryed to create a new deployment.
- I have tryed to use the OAuth2 library from google script.
- Made sure my OAuth consent screen is set up properly with the Tasks API scope
Here are some details that might help:
- The Authorized JavaScript origin I’m using: https://script.google.com/macros/s/MY_DEPLOYMENT_ID/
- The Authorized redirect URI I’m using: https://script.google.com/macros/s/YOUR_DEPLOYMENT_ID/oauth2callback
I’m really stumped. Has anyone else encountered this issue? Any tips or tricks would be greatly appreciated!