We Want to Hear From You! What Do You Want to See on the Community? Tell us here!
Forum Discussion
aalok
3 years agoExplorer | Level 4
webhook not getting file or folder information like added or deleted from dropbox
Currently, I am using dropbox-Php-SDK Kunal Verma. webhook URL added in dropbox console. at the change of file or folder, the webhook gets active.
$listFolderContents = $dropbox->listFolder("/",[ "include_deleted"=> false,"include_has_explicit_shared_members"=> false,"include_media_info"=> false,"include_mounted_folders"=> true,"include_non_downloadable_files"=> true,"path"=> "/",'recursive' => true]);
print_r($listFolderContents);
$cursor = $listFolderContents->getCursor();
$listFolderContinue = $dropbox->listFolderContinue($cursor);
$post_dump = print_r($listFolderContinue, TRUE);
$fpost = fopen('logs.txt', 'w');
fwrite($fpost, $post_dump);
fclose($fpost);
then I am trying to get the cursor and send it to listFolderContinue function but getting blanck entry
response :
Kunnu\Dropbox\Models\MetadataCollection Object
(
[data:protected] => Array
(
[entries] => Array
(
)
[cursor] => **********************_NTiXkJp_ZcSFBt5NwY_Hvum1NbUA4aMwMr5A_A9-oL_usI65mlvlg0K4E1rElQMXXOBjqTEcEV37HTxB-StFmr1j3t9li7LLHI9DRmfbywU3OXCZoH6yzYEbATNcug2Nd1XuHxM-jC6SmdY4Aj3oeZVaQ9R5hkDVLPCiw4h_dtOEtdE
[has_more] =>
)
[items:protected] => Kunnu\Dropbox\Models\ModelCollection Object
(
[items:protected] => Array
(
)
[escapeWhenCastingToString:protected] =>
)
[cursor:protected] => ********************NTiXkJp_ZcSFBt5NwY_Hvum1NbUA4aMwMr5A_A9-oL_usI65mlvlg0K4E1rElQMXXOBjqTEcEV37HTxB-StFmr1j3t9li7LLHI9DRmfbywU3OXCZoH6yzYEbATNcug2Nd1XuHxM-jC6SmdY4Aj3oeZVaQ9R5hkDVLPCiw4h_dtOEtdE
[hasMoreItems:protected] =>
)
1 Reply
- Greg-DB3 years ago
Dropbox Community Moderator
Is this output just the $post_dump that you're saving to logs.txt? If so, it looks like that only includes the result of the listFolderContinue call, but not listFolder. While you do need to implement both, in this case it's possible all of the results are being returned by listFolder, and so there's nothing left to return by listFolderContinue. You should always check 'has_more' to see if you need to call back for more entries or not.
About Discuss Dropbox Developer & API
Make connections with other developers814 PostsLatest Activity: 3 days ago
The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.
If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X or Facebook.
For more info on available support options for your Dropbox plan, see this article.
If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!