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

Aimed's avatar
Aimed
New member | Level 2
6 months ago

Dropbox refuses to connect when using embedder

When i try to use the embedder in an iframe, it shows that dropbox.com refused to connect.

I made sure that i have added localhost in chooser/saver/embedder domain section in the app console, similar posts seem to have this as a solution but it does not work for me, any idea why and how to fix it?
  • iNeil's avatar
    iNeil
    Icon for Dropbox Engineer rankDropbox Engineer

    Hello Aimed 

    Hope that you are well! Would you be able to cross-check if you are using the correct data-app-key value that is connected to your API app when you embed the dropin.js script?

    Please note that if you are using the IP address 127.0.0.1 to access your localhost, you will need to include 127.0.0.1 in the domain section of the API app. If you are still having difficulty, please provide a code snippet of your implementation.

  • GabrielLuke's avatar
    GabrielLuke
    Helpful | Level 5

    You've set the domain correctly, but here are a few things to check:

    1. URL Format: Ensure the iframe URL is correct (e.g., http://localhost:3000 or http://127.0.0.1:3000).
    2. CORS: Make sure your server allows requests from localhost or the IP address 127.0.0.1.
    3. Cache: Try clearing your browser cache or use an incognito window.
    4. Console Errors: Check the browser console for any specific error messages.

    If the issue persists, try deploying to a staging server to see if it works outside of localhost. Let me know if that helps!