cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Back again with another edition of 'How we use Dropbox', so find out how Emma uses to-do lists to get it all done here!

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

php read CSV file in dropbox

php read CSV file in dropbox

ellisyu
Explorer | Level 3
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%...";
$fileData=fopen($url,'r');

Is the $url wrong?
3 Replies 3

Re: php read CSV file in dropbox

Greg-DB
Dropboxer
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?

Re: php read CSV file in dropbox

ellisyu
Explorer | Level 3
I use browser to try this url, but got ERR_INVALID_RESPONSE.
Is there anything wrong with the url?

Re: php read CSV file in dropbox

Greg-DB
Dropboxer
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?
Poll
We love to learn from the educators who use Dropbox. Whether you teach kids, teens, adults or a combination of all three, we want to know what apps and integrations you use with Dropbox to help with teaching. Which of the ones below is your favorite, or most used tool?
Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropboxer
  • User avatar
    ellisyu Explorer | Level 3
What do Dropbox user levels mean?
Need more support?