I have no problem getting a token. With that token I can submit
/2/team/token/get_authenticated_admin and get the admin info. From there, I can submit
/2/users/get_current_account, passing the team_member_id I got from the previous api call.
One of the items passed back is:
"root_info": {
".tag"
:
"user",
"root_namespace_id"
:
"2617xxxxxx",
"home_namespace_id"
:
"1787xxxxxx",
"home_path"
:
"/Mariah"
}I have no issues with this:
curl -X POST https://api.dropboxapi.com/2/files/list_folder \
--header 'Authorization: Bearer <mytoken> \
--header 'Content-Type: application/json' \
--header 'Dropbox-Api-Select-User: dbmid:AACFxxxxxxxxxxxxxxxxxxxx' \
--data '{"path":"/kickee images","recursive":false,"include_media_info":true,"include_mounted_folders":true}'</mytoken>From that, one of the returned items is:
{
".tag": "file",
"name": "OSD78-3-K-YRC-VS-alt2-YAL.jpg",
"path_lower": "/kickee images/osd78-3-k-yrc-vs-alt2-yal.jpg",
"path_display": "/KICKEE IMAGES/OSD78-3-K-YRC-VS-alt2-YAL.jpg",
"parent_shared_folder_id": "1798xxxxx",
"id": "id:OSjWkHwnxxxxxxxxxxx",
"client_modified": "2022-06-16T15:46:52Z",
"server_modified": "2023-08-16T18:40:49Z",
"rev": "6030ea26b853d6b372fb3",
"size": 158532,
"sharing_info": {
"read_only": false,
"parent_shared_folder_id": "1798xxxxx",
"modified_by": "dbid:AABa5y4GiPxxxxxxx"
},
"is_downloadable": true,
"content_hash": "73021542c3f9b6e2adb7e7ac61f54d46ece0893a2f51766594b40f798efab548"
}However, when I try to get a file count on the root directory using the root_namespace_id:
curl -X POST https://api.dropboxapi.com/2/file_requests/count \
--header 'Authorization: Bearer <mytoken>' \
--header 'Content-Type: application/json' \
--header 'Dropbox-Api-Path-Root: {".tag":"root", "root":"2617xxxxx"}' \
--header 'Dropbox-Api-Select-User: dbmid:AACFxh5TjExxxxxxx' \
--data 'null'</mytoken>I get this: { "file_request_count": 0 }
If I use the home_namespace_id in the above call, I get this:
{ "error": { ".tag": "invalid_root", "invalid_root": { ".tag": "team", "home_namespace_id": "1787xxxxx", "home_path": "/Mariah Nagma", "root_namespace_id": "2617xxxxx" } }, "error_summary": "invalid_root/" }All I'm trying to do, eventually, is to move/rename a file. But I can't even get a file count or a file list:
{
"file_requests": [],
"cursor": "AACkg6FBSbDUskOcnoVpSIWAibkbgr2HGN39aJS3N_ssPfHfHs0vZ3E8QqO0n3UuCyEo2I0qXc7S2lPER8gUSEocbDLqw4aw84Zl8Rsr8K3dMuaSgtsm2jDQs6amotL-N69UJdqLLUipIrDg-8Ibx7sO79J6VbrkGr0DGzCaemCm8_eDJrEIX5bfbn4_7xAY9tTSklglnhB8O37vNnm424ZT",
"has_more": false
}A move requests informs me that source file doesn't exist:
{
"error_summary": "from_lookup/not_found/...",
"error": {
".tag": "from_lookup",
"from_lookup": {
".tag": "not_found"
}
}
}What am I doing wrong?
Thanks,
Chris