Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ReferenceError: "Drive" is not defined. (line 16, file "Code") in google app script

When I try to use Google drive reference it always shows ReferenceError: "Drive" is not defined. (line 16, file "Code").

like image 351
Sour LeangChhean Avatar asked May 08 '17 02:05

Sour LeangChhean


People also ask

How do I fix script function not found doGet?

This is because it is still using the old version of your application, before you implemented doGet. You don't need to goto manage versions. You can just do Publish>Deploy as Web App> and select "new" in the project version dropbox.

Why my app script is not working?

There are a few possible causes for these errors: A Google server or system is temporarily unavailable. Wait for a few moments and try running the script again. There is an error in your script that doesn't have a corresponding error message.


1 Answers

I've solves this error by go to:

Resources -> Advanced Google Services -> Enable Drive Api

enter image description here

Note: you need to Enable Drive Api in Google Console

like image 147
Sour LeangChhean Avatar answered Sep 24 '22 23:09

Sour LeangChhean