We Want to Hear From You! What Do You Want to See on the Community? Tell us here!
Forum Discussion
ellisyu
8 years agoExplorer | Level 3
php read CSV file in dropbox
There is a CSV file in Dropbox.
How to read it with php?
The php code is as follows,
$url = "https://content.dropboxapi.com/2/files/download?authorization=Bearer%20<TOKEN>&arg=%7B%22path%22%3A%20%22%2Ftest.csv%22%7D";
$fileData=fopen($url,'r');
Is the $url wrong?
How to read it with php?
The php code is as follows,
$url = "https://content.dropboxapi.com/2/files/download?authorization=Bearer%20<TOKEN>&arg=%7B%22path%22%3A%20%22%2Ftest.csv%22%7D";
$fileData=fopen($url,'r');
Is the $url wrong?
3 Replies
- Greg-DB8 years ago
Dropbox Community Moderator
That URL structure looks right for accessing file data via /2/files/download using a GET request.
What exactly isn't working for you? What error or unexpected output are you getting? - ellisyu8 years agoExplorer | Level 3I use browser to try this url, but got ERR_INVALID_RESPONSE.
Is there anything wrong with the url? - Greg-DB8 years ago
Dropbox Community Moderator
My sample, using your structure but plugging in my own access token, is working for me in Chrome, Safari, and Firefox.
What browser are you using?
If you check using the developer tools, what's the actual HTTP response that you get?
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.6,036 PostsLatest Activity: 2 days ago
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 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!