{
  "id": 19585864,
  "title": "I Wasted 3 Days on Google Drive 'Open With' OAuth — Here's Everything I Learned",
  "url": "https://urgent.news/2026/11/12/i-wasted-3-days-on-google-drive-open-with-oauth-heres-everything-i",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-11-12T02:09:42.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/hetianhe/i-wasted-3-days-on-google-drive-open-with-oauth-heres-everything-i-learned-1h55"
  },
  "original_language": "en",
  "account": "Three days were spent resolving an OAuth error with Google Drive Open With app, despite a simple fix that was overlooked. The issue arose when using ngrok for local development and updating the production redirect URI. The problem was that the redirect_uri in the request did not match a registered redirect URI, even after updating the .env file and redeploying the Docker container. The reason for this discrepancy was that the redirect_uri in the request was constructed by Google's servers, not the developer's server. To resolve the issue, the actual redirect_uri needed to be obtained from Chrome DevTools and then queried directly from the App Registry using an access token. This revealed that the outdated ngrok URL was hard-coded in the openUrlTemplate field, which needed to be updated to the correct production URL.",
  "summary": "Three days. That's how long it took me to fix a single OAuth error that, in hindsight, had a five-minute solution. The catch? The fix was in a place I never thought to look. If you're building a Google Drive \"Open With\" App and you're seeing: Error 400: redirect_uri_mismatch ...this post is for you. I'll walk through exactly how to diagnose it, why the usual advice doesn't work, and the specific…",
  "key_points": [
    "Three days spent resolving OAuth error with Google Drive Open With app",
    "Redirect URI mismatch due to ngrok URL hard-coded in openUrlTemplate",
    "Actual redirecturi obtained from Chrome DevTools and queried via access token"
  ],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}