Google Chat Bot Redirects to 'You Need Access' Page After OAuth Consent -- what might be causing this?

I built a Google Chat bot with Apps Script and published it to the Google Workspace Marketplace. It works fine in testing or for anyone with editor access to the Apps Script project.

The problem: when regular users try it, they get the OAuth consent screen, but instead of being returned to the chat app, they’re redirected to an Apps Script page saying “You need access” with editor permissions pre-selected. Users shouldn’t need edit access just to use the bot.

I’ve checked all the settings and gone back and forth with support, but nothing has fixed it.

Details:

  • Bot uses app-level authentication only (no user auth).

  • Screenshots attached of the access request and script settings.

  • The project uses Script Properties – could that be related?

Code

Manifest:

{
  "timeZone": "America/New_York",
  "dependencies": {
    "enabledAdvancedServices": [
      {
        "userSymbol": "Chat",
        "version": "v1",
        "serviceId": "chat"
      }
    ],
    "libraries": [
      {
        "userSymbol": "OAuth2",
        "version": "43",
        "libraryId": "1B7FSrk5Zi6L1rSxxTDgDEUsPzlukDsi4KGuTMorsTQHhGBzBkMun4iDF"
      }
    ]
  },
  "exceptionLogging": "STACKDRIVER",
  "runtimeVersion": "V8",
  "oauthScopes": [
    "https://www.googleapis.com/auth/userinfo.email",
    "https://www.googleapis.com/auth/userinfo.profile",
    "https://www.googleapis.com/auth/script.external_request"
  ],
  "addOns": {
    "common": {
      "name": "...",
      "logoUrl": "..."
    },
    "chat": {}
  }
}

Steps to reproduce:

  1. End user opens a direct message with the bot in Google Chat

  2. The bot asks them to configure before using with a button

  3. When they click the configure button, the Oauth screen opens with the expected scopes

  4. When they grant access to the needed scopes:

  • Expect: they are redirected back to Google Chat and are able to use the chat bot.

  • Result: they are redirected to the pictured “You need access” page in Apps Script asking them to request edit access to the Apps Script project.

I have just published a Google Chat App to the marketplace but keeps getting editor request access to the Apps Script project from people.

Might be related with this. Still looking for solution.
Please share if you manage to solve this!

Any success?

I migrated the app to Google Cloud Run (HTTP Deployment instead of Apps Script) which solved the issue