DropboxダウンロードファイルAPIを使用していますが、トークンを取得しましたが、400の不正なリクエストエラーが返されます "API関数"ファイル/ダウンロード " "承認" またはURLパラメータ "承認"DropboxダウンロードファイルAPIが400エラーで動作しなくなった
私はDropboxののAPIドキュメントに従いますが、それが動作することはできません〜 "" 〜 が、私はそれをどのように修正すればよい?
これは私のコード(angular2)である
downloadFile(fileid){
let headers = new Headers();
headers.append('Authorization', 'Bearer ' + this.accessToken);
headers.append('Dropbox-API-Arg','path:'+ fileid);
return this.http.post('https://content.dropboxapi.com/2/files/download',new RequestOptions({ headers: headers ,responseType:ResponseContentType.ArrayBuffer})).map((res) => {
let arrayBuffer = res.arrayBuffer();
let contentType = res.headers.get('content-type');
return {
fileid: fileid,
blob: new Blob([arrayBuffer], { type: contentType })
};
});
:
だから多分angular2に、あなたのような何かをする必要があります。
をも 'Dropboxが-API-Argの' ヘッダは次のようにする必要がありますあなたの認証トークンには? –
私はdropbox api docに従います。Bearer https://www.dropbox.com/developers/documentation/http/documentation#files-download – steven
[参照用クロスリンク:https://www.dropboxforum.com/ t5/API-support/download-file-API-stopped-working-with-400-error/mp/211317#M10617] – Greg