ManifestsApp
ManifestsApp copied to clipboard
Are scopes for ManifestApp defined in the library manifest?
Great work!
I was wondering if in the library code you had defined the required scopes in the manifest for the library? I believe doing so would mean when the user adds the library the scopes will be automatically detected and not have to be manually added to the users script project manifest.
@mhawksey
Thank you for your comments. Yes. I think that your comments are correct. In my environment, when this library was installed and saved the project, the required scopes are automatically installed to user's project. But since I had not been able to confirm whether this always occurs, I didn't written about this. I couldn't find about this at Google. When I knew that this always occurs, I would like to add about it to README.md.
Now, I set "oauthScopes" to this library as follows.
"oauthScopes": [
"https://www.googleapis.com/auth/script.external_request",
"https://www.googleapis.com/auth/script.scriptapp",
"https://www.googleapis.com/auth/drive",
"https://www.googleapis.com/auth/drive.scripts"
]
In my environment, I confirmed that the new project installed this library has the same scopes as the default scopes. If this also occurs at your environment, this can be published as the true.
If it's so, I think that this will be a big news for the GAS developers. By installing the library set "oauthScopes", users are not required to manually install the scopes.
Now, the situation that I confirmed is as follows.
- By installing the library which was given "oauthScopes" of Manifests, the new project can automatically have those scopes as the default scopes.
- And when users create the scripts in the project installed the library, the scopes depended on the scripts is automatically installed to the project.
If I could confirm that other users also occur this, I would like to publish this as a news.
Can you confirm this at your environment? If this occurred also at your environment, I'm glad.
Having researched manifest files I believe it is correct that script projects will automatically inherit scopes defined in a library if no scopes have been defined in the script project. I have written about this here (and have provided examples for ManifestApp :)
Thank you for your reply. I saw the URL. That's a great report. And I appreciate that MinifestApp is included in it. Thank you so much.
I would like to publish about the automatic addition of scopes to projects using Library, as a report. And I would like to update README.md on GitHub. At that time, can I include the URL of your report? I will report when I published.
I could publish the report at here. Thank you so much.
Thank you for the acknowledgement. Great work, I'm a big fan m(_ _)m
Thank you, too!
@tanaikech, thank you for this tool! @mhawksey , thank you for the blog! I would not have found this tool or clear directions on creating a manifest file in Apps Script without the video and slide.