I have a simple apps script project that creates a Space in G-Chat and later will add some users to it. Very simple and it worked many times until this morning when I started getting an error:
Some requested scopes cannot be shown: [https://www.googleapis.com/auth/chat.import]
I have been working on resolving this all day with no luck. I have stripped the complexity back to this:
I tried manually adding the scope (https://www.googleapis.com/auth/chat.import), but it just gives a red "?" circle. I have also added all Google Chat API scopes explicitly to try and get this resolved.
I appreciate any ideas you may have.
Solved! Go to Solution.
In the script manifest, manually set the scopes but *exclude* chat.import (but make sure you have either https://www.googleapis.com/auth/chat.spaces or https://www.googleapis.com/auth/chat.spaces.create)
The chat.import scope can only be used in very particular use cases and is disallowed on the consent screen. But as a side-effect of how Apps Scripts automatically determines scopes it's incorrectly included.
In the script manifest, manually set the scopes but *exclude* chat.import (but make sure you have either https://www.googleapis.com/auth/chat.spaces or https://www.googleapis.com/auth/chat.spaces.create)
The chat.import scope can only be used in very particular use cases and is disallowed on the consent screen. But as a side-effect of how Apps Scripts automatically determines scopes it's incorrectly included.
And just like that, I'm back up and running. Thank you so much for the quick reply! Do you know why that scope was suddenly included when it wasn't utilized by the code?
This issue is being tracked in https://issuetracker.google.com/337335902.