I am implementing Google drive v3 api in AngularJS version 1 project. I have gone through the docs and the related stuffs but still unable to implement it successfully. Sometime I get the error "Daily unauthorized limit exceeded" and sometime "File not found" against the query gapi.client.drive.files.list. Here is my js code:enter code here
function start() { gapi.client.init({ 'apiKey': 'AIzaSyBqVx6XgBXjvbLZNP-aX8gBqi8pXZZhOxw', 'discoveryDocs': ['http://ift.tt/23UhMWt'], }).then(function (res) { console.log(res); gapi.client.drive.files.list({ 'pageSize': 10, 'q': "mimeType = 'application/vnd.google-apps.folder' and trashed = false", 'fields': "nextPageToken, files(id, name)" }).then(function (response) { console.log(response); } else { console.log('No files found.'); } }, function (err) { console.log(err) }); }) };
gapi.load('client', start);
Aucun commentaire:
Enregistrer un commentaire