Need to see if your shared folder is taking up space on your dropbox 👨💻? Find out how to check here.
Forum Discussion
jmccolgan93
7 years agoExplorer | Level 3
CORS Access-Control-Allow-Origin
Hey guys, so i have this angular script to pull in a json file I'm storing in Dropbox. my current issue is that I get an Access-Control-Allow-Origin error every time. I'm not really sure how to fix it...
<script type="text/javascript">
var app = angular.module("mig-usedgear", [])
app.controller("myCtrl", function($scope, $http) {
$http.get("http://www.dropbox.com/s/8g7fump2tnbohv2/items.json?raw=1")
.then(function(response) {
$scope.friends = response.data;
});
});
</script>1 Reply
- Greg-DB7 years ago
Dropbox Community Moderator
The 'www.dropbox.com site' doesn't allow CORS like this.
You can technically make this work using 'dl.dropboxusercontent.com' (e.g., "http://dl.dropboxusercontent.com/s/8g7fump2tnbohv2/items.json"), but please note that isn't officially supported.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.
If 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, Facebook or Instagram.
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!