最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

google apps script - Can Slides API use only drive.file scope - Stack Overflow

programmeradmin1浏览0评论

I oauth verification for the Slides add-on. OAuth Dev verification point next mail.

Minimum Scope Requirement You requested the following sensitive scope(s):

Please review the following information to understand if the drive.file scope is a better fit for your application. If your request does not meet the eligibility requirements outlined below, we won’t be able to grant your request for restricted Drive APIs.

Google Slides API reference wrote

Authorization scopes

Requires one of the following OAuth scopes:

.file .readonly

but i understand to use slides api needs drive.file and presentations or presentations.currentonly.

I replay that.but verification replay same. use drive.file insted presentations.

Is it my mistake? Can Slide api use only drive.file scope

I tested delete auth/presentations, but error occured

Exception: Specified permissions are not sufficient to call SlidesApp.getActivePresentation. Required permissions: (.currentonly || )

I oauth verification for the Slides add-on. OAuth Dev verification point next mail.

Minimum Scope Requirement You requested the following sensitive scope(s):

https://www.googleapis/auth/presentations Please review the following information to understand if the drive.file scope is a better fit for your application. If your request does not meet the eligibility requirements outlined below, we won’t be able to grant your request for restricted Drive APIs.

Google Slides API reference wrote

Authorization scopes

Requires one of the following OAuth scopes:

https://www.googleapis/auth/drive https://www.googleapis/auth/drive.file https://www.googleapis/auth/drive.readonly https://www.googleapis/auth/presentations

but i understand to use slides api needs drive.file and presentations or presentations.currentonly.

I replay that.but verification replay same. use drive.file insted presentations.

Is it my mistake? Can Slide api use only drive.file scope

I tested delete auth/presentations, but error occured

Exception: Specified permissions are not sufficient to call SlidesApp.getActivePresentation. Required permissions: (https://www.googleapis/auth/presentations.currentonly || https://www.googleapis/auth/presentations)

Share Improve this question asked Mar 13 at 3:32 Toshiyuki KawashimaToshiyuki Kawashima 51 silver badge2 bronze badges 6
  • Edit to add new info. Advanced slides also won't work. You specifically need to use github/googleworkspace/apps-script-oauth2/tree/main/samples/… – TheMaster Commented Mar 13 at 4:38
  • And yes, it will be hard to rewrite everything, if you already have a lot. – TheMaster Commented Mar 13 at 4:39
  • thanks.So i rewrite SlidesApp class all method and fields. – Toshiyuki Kawashima Commented Mar 13 at 6:25
  • Yes AND you need to create the file with this script or use Google picker: developers.google/apps-script/guides/… – TheMaster Commented Mar 13 at 6:56
  • 1 I konw.first i use drive.readnly file scope.Verification teams point use drive.file. I rewrite editor addon to google workspace addon.And use onFileScopeGrantedTrigger instead use google picker api. It is very hard html I/F to card services. Then teams point delete presentations scope.I coufused. – Toshiyuki Kawashima Commented Mar 13 at 7:14
 |  Show 1 more comment

1 Answer 1

Reset to default 1

Slides API can use drive.file scope1, but Apps script inbuilt methods like SlidesApp.getActivePresentation() cannot2. It is possible to directly access the api through UrlFetchApp3.

Furthermore, drive.file scope can only be used if the user explicitly grants access to the file using google-picker4 or if the script created the file5.

发布评论

评论列表(0)

  1. 暂无评论