How to use a Google APIs

41 views
Skip to first unread message

Fco. Javier Lledó Fuster

unread,
Dec 1, 2020, 12:15:49 AM12/1/20
to google-apps-sc...@googlegroups.com
Hello,

I usually with Google Apps Script I start using DriveApp, SpreadsheetApp...but I have read other internal APIs to do this, like this (https://developers.google.com/drive/api/v3/reference/files/list#try-it).

Can anyone explain me or link me to any webpage to learn how to use it? I am thinking in use inside of GAS or externally...

Thanks!

Tanaike

unread,
Dec 1, 2020, 3:35:16 AM12/1/20
to Google Apps Script Community
I think that when you want to use the method of "Files: list" of Drive API with Google Apps Script, the threads of Stackoverflow might be useful.

When you want to use it with other languages except for Google Apps Script,  these threads might be useful.

There is one important point for using Drive API with Advanced Google services of Google Apps Script. In the current stage, when Advanced Google services is used, the version of Drive API is v2. When you want to use the Drive API v3 using Google Apps Script, it is required to directly request to the endpoint of Drive API using UrlFetchApp. Please be careful this.

Adam Morris

unread,
Dec 1, 2020, 6:04:41 AM12/1/20
to google-apps-sc...@googlegroups.com
It's actually a really interesting topic to explore. I wonder how many out there would appreciate tutorials on how to work with these APIs, more in raw form?

--
You received this message because you are subscribed to the Google Groups "Google Apps Script Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-script-c...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-script-community/CALareE7j3C%3DtHQVhBdD8%3DbXyTmFDvGAZP9H64q96O2c%3DChzM_Q%40mail.gmail.com.

Alan Wells

unread,
Dec 1, 2020, 11:16:42 AM12/1/20
to Google Apps Script Community
There are a few key things that you need to know about using API's with Apps Script.

1) Don't bother looking at any of the documentation for SDK's not even for JavaScript.  That will not help you at all.
     I don't see any SDK information in the Drive API documentation, but the documentation for other API's have SDKs.
2) Unless you are using the Advanced Drive Service then you'll need to use UrlFetchApp.fetch(url) for all the requests to the API.
    What you need to focus on is the REST API.
    Unfortunately, in some API documentation, the REST requests are described in terms of CURL, which you then need to decipher and convert.
    The Drive API doesn't have that issue though.
3) Once you understand the basic concepts, the challenge is configuring the URL and the Request options.
     For specific issues to configuring the payload for a POST request, you can do a search or ask a question on Stack Overflow.

Alan Wells

unread,
Dec 1, 2020, 11:21:16 AM12/1/20
to Google Apps Script Community
I'm sure that people would really like a good tutorial on how to work with API's in Apps Script.
The problem is finding the tutorial.
Google should allow 3rd party information providers to link to their content in the documentation, as long as it meets some requirements.

Kim Nilsson

unread,
Dec 3, 2020, 5:50:46 AM12/3/20
to Google Apps Script Community
Yes, they have such a process for education content.
Where for example Google Certified Innovators can create content and then submit it to Google for publication.
They could set up something similar for Cloud content.

Adam Morris

unread,
Dec 3, 2020, 6:53:43 AM12/3/20
to google-apps-sc...@googlegroups.com
I also think the documentation could be improved. I think the main problem with it is the intended audience appears to be programmers who are just looking stuff up. 

I can also see why they prioritize having that reference information. A tutorial can become outdated and whenever in doubt, one needs to go check out the reference information.

But I do think there's room for a broader education-based approach, and that's a good idea to link to other writers.


--
You received this message because you are subscribed to the Google Groups "Google Apps Script Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-script-c...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages