通過 curl 列出根資料夾

這將使用 curl,使用 / files / list_folder 列出根資料夾,該資料夾由 Dropbox API v2 的空字串 "" 標識

curl -X POST https://api.dropboxapi.com/2/files/list_folder \
    --header "Authorization: Bearer <ACCESS_TOKEN>" \
    --header "Content-Type: application/json" \
    --data "{\"path\": \"\"}"

<ACCESS_TOKEN> 應替換為 OAuth 2 訪問令牌。

請注意,響應可能包含 has_more=true,在這種情況下,你的應用應回撥 / files / list_folder / 繼續獲取更多條目。