Dropbox Download File Api Stopped Working With 400 Error
I use dropbox download file API , and i got a token , but it's return 400 bad request error 'Error in call to API function 'files/download': Must provide HTTP header 'Authorizati
Solution 1:
I use dropbox v2 api in android. Just as you, I got 400 bad request. It turns out that Android HttpUrlConnection set a default "Content-Type" header value. And dropbox download api require "Content-Type" to be missing or empty. I don't have same issue in iOS though.
So maybe in angular2, you need to do something like:
headers.append('Content-Type','');
Also the 'Dropbox-API-Arg' header need to be like:
headers.append('Dropbox-API-Arg','{\"path\": \"/filepath\"}');
Post a Comment for "Dropbox Download File Api Stopped Working With 400 Error"