Google Drive Picker - Developer Key is Invalid Error

后端 未结 4 1295
旧巷少年郎
旧巷少年郎 2020-12-05 10:11

I started to learn Google Drive Picker API and started with my localhost (I have created my client id and browser key for the domain http://localhost/

4条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-05 10:58

    I don't know if Google has changed the API's since the accepted answer, but today, in January 2015, this worked for me, where the above answers didn't:

    According to the Credentials page:

    Public API access

    Use of this key does not require any user action or consent, does not grant access to any account information, and is not used for authorization.

    Elsewhere I read that the API/Developer/Browser key is not needed if oAuthToken is used. So, I amended the above code, by simply losing the line:

    .setDeveloperKey('AIzaSyB3I3JOepScrZgySA9tBWL9pXAUaLJ-NFg')
    

    For completeness, here's the full amended code, hope it works for you:

    
    
      
        
        Google Picker Example
    
       
            
      
      
        

提交回复
热议问题