Control access scopes in google chat bot using apps script

I have made a google chat app using apps script. While deployed the app I have made the script running as me itself. But on configuration by users, it is asking for edit, read access to the user's spreadsheet

I don't want to ask the user permission for their spreadsheet datas, instead just this single spreadsheet access is needed

Upvotes: 0

Views: 78

Answers (1)

Wicket
Wicket

Reputation: 38416

There is no way to limit authorization scopes to access a single spreadsheet for a chatbot.

The closest to this is to add /** @OnlyCurrentDoc */, but this only works for bounded scripts.

Your best option might be to use UrlFetchApp with authorization credentials that you could store in your project, assuming you keep it private.

Upvotes: 0

Related Questions