Guest User

Untitled

a guest
Nov 20th, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. gapi.load('client', () => {
  2.  
  3. gapi.client.load('storage', 'v1', authResult =>{
  4.  
  5. gapi.auth.authorize({
  6. client_id: CLIENT_ID,
  7. scope: SCOPES,
  8. immediate: false
  9. },authResult=>{
  10.  
  11. if (authResult && !authResult.error) {
  12. var request = gapi.client.storage.buckets.list({
  13. 'project': PROJECT_ID
  14. });
  15. request.execute(function(resp) {
  16. console.log(resp)
  17. });
  18.  
  19. } else {
  20. alert("Un-Authorised")
  21. }
  22.  
  23.  
  24. });
  25.  
  26. });
  27.  
  28. });
Add Comment
Please, Sign In to add comment