get gmail contacts Google Contacts API with javascript

前端 未结 5 1541
挽巷
挽巷 2021-01-03 12:29

it always says The page you requested is invalid. how can i fetch the contacts with javascript using google contacts api i have valid scope and Client ID



        
5条回答
  •  庸人自扰
    2021-01-03 12:54

    I ran into the same problem, I solved it by first retrieving an access token, and then call the API directly. This is because the javascript api (gapi) does not support retrieving google contacts.

    Since it was quite the hassle, I wrote a blogpost about it here: https://labs.magnet.me/nerds/2015/05/11/importing-google-contacts-with-javascript.html

    Basically this is how I solved it:

    
    
      
        
        
      
      
        
            
            
      
    
    

提交回复
热议问题