I'm trying to show docs, pdfs, and sheets from google drive in my website, then I'm using the following code:
<iframe src="https://docs.google.com/viewer?srcid=[FILE ID]&pid=explorer&efh=false&a=v&chrome=false&embedded=true" style="width: 100%; height: 92vh;border: none;"></iframe>
When I'm logged in the account owner of the file, it work just fine, but when I'm not, it try to redirect me to a login page, but gives the error:
Refused to display 'https://drive.google.com/accounts?continueUrl=https://drive.google.com/file/d/[FILE ID]/preview&ddrp=1#' in a frame because it set 'X-Frame-Options' to 'sameorigin'.
Anybody knows why I got that error? I'm doing something wrong?