Question

I am trying to integrate a Google Picker for selecting files from Google Drive following this example.
When opening the picker I get an error in the javascript console and the dialog prompts for a login.

Unable to post message to https://docs.google.com. Recipient has origin https://my-app.herokuapp.com.

When clicking the login button a popup opens and immediately closes again, but nothing happens.

When closing the dialog there is another error in the javascript console

Unknown RPC service: picker 

I am not quite sure what causes these errors or even what to make of it.

Can somebody put me in the right direction?

EDIT
User is logged in to the app. Also, when using "Open with" menu on a file in the Google Drive interface and choose my application, I can access that file.

Was it helpful?

Solution

You have to add https://my-app.herokuapp.com to the list of authorized Javascript Origins in the APIs Console:

  • go to the APIs Console: https://code.google.com/apis/console/
  • select your project from the dropdown menu
  • open the tab API Access
  • click on Edit Settings for the Client ID for Web Applications section corresponding to your client
  • add the URI to the list of Authorized JavaScript Origins
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top