Guest User

Untitled

a guest
Oct 22nd, 2017
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.93 KB | None | 0 0
  1. "oauth2": {
  2. "client_id": "999999.apps.googleusercontent.com",
  3. "scopes": [
  4. "https://www.googleapis.com/auth/drive.appdata"
  5. ]
  6. },
  7.  
  8. $.getScript("https://apis.google.com/js/client.js", function () {
  9.  
  10. gapi.load('client', function () {
  11.  
  12. console.log("gapi.client is loaded")
  13.  
  14. gapi.client.load('drive', 'v3', function () {
  15.  
  16. console.log("gapi.client.drive is loaded");
  17.  
  18. chrome.identity.getAuthToken({'interactive': true}, function (token) {
  19.  
  20. gapi.client.setToken({access_token: token});
  21.  
  22. console.log("token :", token);
  23.  
  24. gapi.client.drive.files.list().then(function (list) {
  25. console.log(list)
  26. })
  27.  
  28. });
  29.  
  30. });
  31. });
  32. });
  33.  
  34. gapi.client is loaded
  35. gapi.client.drive is loaded
  36. token : [TOKEN]
  37.  
  38. "code": 403,
  39. "message": "The granted scopes do not give access to all of the requested spaces."
Add Comment
Please, Sign In to add comment