cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Want to learn some quick and useful tips to make your day easier? Check out how Calvin uses Replay to get feedback from other teams at Dropbox 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: 

File temporary link generation doesn't work

File temporary link generation doesn't work

Amicao
Explorer | Level 3

I am trying to generate a temporary link from test file with curl command, but this doesn't work and return this following error:

               curl: (92) HTTP/2 stream 1 was not closed cleanly before end of the underlying stream

My Curl Request:

curl -X POST https://api.dropboxapi.com/2/files/get_temporary_link \
    --header "Authorization: Bearer <get access token>
" \
    --header "Content-Type: application/json" \
    --data "{\"path\":\"/test/txt.txt\"}"

I am putting the Access Token recently generated in "<get access token>" and I have created the folder and uploaded the file in following path of Dropbox:

https://www.dropbox.com/s/x2k3bzxeud3h06g/txt.txt?dl=0

 

 

I don't understand why this isn't working.

 

I would like to be helped.

1 Reply 1

Greg-DB
Dropbox Staff

I just replicated this setup and ran this code using my own test file/folder/access token, but the issue didn't reproduce for me. I received a successful reply from the API with the expected temporary link.

 

Are you still seeing this issue? If so, is there anything on the network connection, such as a proxy, firewall, VPN, anti-virus, etc., that may be interfering with your connections to api.dropboxapi.com? You may need to contact your network admin for help with that.

 

You may also want to try this on another device/network connection and see if it reproduces there.

 

Otherwise, you may want to update your curl version, in case you're running in to a bug in the version of curl you're using. And to help debug this, you can enable verbose output with "-v".

 

Alternatively, since this seems to be related to HTTP/2, you may be able to work around this by downgrading to HTTP/1.1 using "--http1.1", though that's not recommended.

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropbox Staff
What do Dropbox user levels mean?