You might see that the Dropbox Community team have been busy working on some major updates to the Community itself! So, here is some info on what’s changed, what’s staying the same and what you can expect from the Dropbox Community overall.
Forum Discussion
ikenderham
5 years agoExplorer | Level 3
Dropbox embedder not working - Blocked for X-frame-options
Hello
I am trying to show a dropbox folder on my wordpress website through your embedder.
I followed your guide on https://www.dropbox.com/developers/embedder but its not showing the fold...
- 5 years ago
Since you're attempting to use the Embedder on https://dropbox.diddo.dk/dropbox, you should register the domain 'dropbox.diddo.dk' (or just 'diddo.dk'; see my earlier comment).
Do not include the protocol 'https://' since that's not part of the domain. Also, do not prepend 'www' since that's not in the actual domain in https://dropbox.diddo.dk/dropbox that you're using.
I'm not sure why you're trying to use 'www' since that isn't part of the domain you've mentioned. But, if you did want to use the Embedder on https://www.diddo.dk/dropbox/, for instance, only then would you need to register 'www.diddo.dk' (or, as above, 'diddo.dk').
Also, in your comment here I see you're showing a sample shared link from the Embedder docs, but on your actual page you are trying to use a different shared link (presumably your own). That shared link is currently returning a 404 error page though, indicating that the link has been disabled. So, once you register the correct domain above, you'll also want to replace this old disabled shared link with a working one.
Greg-DB
Dropbox Staff
Can you elaborate on what you mean when you say it didn't work? Specifically:
- what domain did you register?
- are you still testing on https://dropbox.diddo.dk/dropbox/?
- what error are you getting now?
ikenderham
5 years agoExplorer | Level 3
I did register the URL www.diddo.dk and www.dropbox.diddo.dk
i Tried to add the domain as https://dropbox.diddo.dk/ but its tell me the domain is invalid. And i also tried https://www.diddo.dk/ and the domain here is invalid too. But with www.diddo.dk i didnt have problems.
Same error. Try to check https://dropbox.diddo.dk/dropbox
here is what i did.
1. Created a app
2. Followed step on https://www.dropbox.com/developers/embedder
The first thing i did is copyed the script
<script type="text/javascript" src="https://www.dropbox.com/static/api/2/dropins.js" id="dropboxjs" data-app-key="my-app-key"></script>
then i took the script for embed script in af folder and add itto my document
Dropbox.embed({link:"https://www.dropbox.com/sh/keptcjl08q3wsid/AACui966iXcXPbagCJ2py2L-a?dl=0"}, element)
Then i took the anchor tag <a> example you have on the page and addet into my document and changed the link to be the same as the link in the "embed preview of folder"
<a href="https://www.dropbox.com/sh/keptcjl08q3wsid/AACui966iXcXPbagCJ2py2L-a?dl=0" class="dropbox-embed" ></a>
What i am missing?
If i remove the a tag, then nothing happens and nothing shows up. If i add it then i still got the same error
Blocked for politics x-frame-options, in danish "Blokeret af politik for X-Frame-Options"
- Greg-DB5 years agoDropbox Staff
Since you're attempting to use the Embedder on https://dropbox.diddo.dk/dropbox, you should register the domain 'dropbox.diddo.dk' (or just 'diddo.dk'; see my earlier comment).
Do not include the protocol 'https://' since that's not part of the domain. Also, do not prepend 'www' since that's not in the actual domain in https://dropbox.diddo.dk/dropbox that you're using.
I'm not sure why you're trying to use 'www' since that isn't part of the domain you've mentioned. But, if you did want to use the Embedder on https://www.diddo.dk/dropbox/, for instance, only then would you need to register 'www.diddo.dk' (or, as above, 'diddo.dk').
Also, in your comment here I see you're showing a sample shared link from the Embedder docs, but on your actual page you are trying to use a different shared link (presumably your own). That shared link is currently returning a 404 error page though, indicating that the link has been disabled. So, once you register the correct domain above, you'll also want to replace this old disabled shared link with a working one.
- ikenderham5 years agoExplorer | Level 3
Thank you for that. It is working now.
I am trying to make a solution where users who is logged in can download files from the embedder. How can i secure that they cant save the dropbox link and use it in future, when they are dont logged in, in the future? :)
Can i disable "open in dropbox" button? :)
- Greg-DB5 years agoDropbox Staff
No, there isn't a way to disable that button, or hide the shared link itself. Since the Embedder operates by having the page supply the shared link, the user could just inspect the page's source to find the shared link anyway, even if that button wasn't shown.
About Discuss Dropbox Developer & API
Make connections with other developers
797 PostsLatest Activity: 3 days agoIf you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X or Facebook.
For more info on available support options for your Dropbox plan, see this article.
If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!