Reputation: 2114
I'm trying to integrate the "Drive share" popup in my app, following this how-to: https://developers.google.com/drive/manage-sharing#launching_the_google_drive_sharing_dialog_in_your_app
Everything ran well, until I effectively open it. After few seconds I get an error message:
The console contain this error: "Refused to display 'https://drive.google.com/share?id=0BzH05IFzFfzuZWdXYzZPZHRkaUk&foreignServi…tr.apps.googleusercontent.com&embedOrigin=http%3A%2F%2Fvideo.unishared.com' in a frame because it set 'X-Frame-Options' to 'SAMEORIGIN'. "
I suppose that it's related to this requirement: "The URL of the page that launches the dialog must have the same origin as the Open URL registered for the app." but here this is the case.
I can't figure out what's wrong here. Thanks for your help.
EDIT
Some of ours users had reported this issue which is happening randomly, on different browsers. It is not fully solved.
Upvotes: 2
Views: 933
Reputation: 2114
Ok I've just figured out what was wrong with my implementation.
I was using the App ID that you can find for your client in API console, "API access" tab (something like ...apps.googleusercontent.com)
I've just found an other id in the "Drive SDK" tab, just below the title. When using it the popup finally show up!
Upvotes: 2
Reputation: 11672
There are multiple constraints:
From trying your demo, it appears the issue is the fact it isn't installed. The error (burried in the body of one of the responses) is:
'errorMessage': "No application with ID \x22107160330549\x22 is installed.",
After adding install scope:
'errorMessage': "Sorry, the item(s) you requested are not available."
The 2nd error likely coming from the fact that the ID was hardcoded to something not owned by me.
Upvotes: 0
Reputation: 9213
You should allow your embed origin as a whitelisted Javascript origin on API Console. I'm sorry I can't give you a direct link, but it's under API Access tab.
Upvotes: 0