Need to see if your shared folder is taking up space on your dropbox 👨💻? Find out how to check here.
Forum Discussion
toki4004
3 years agoHelpful | Level 5
Error: property_groups: expected list, got string
I am trying to add property groups to a file with
https://content.dropboxapi.com/2/files/upload
and I am getting an error "HTTP header "Dropbox-API-Arg": property_groups: expected list, got stri...
- 3 years ago
toki4004 wrote:..., and now I want to view a folder list with items + see their properties. I get this error:
- "Error in call to API function "files/list_folder": request body: include_property_groups.filter_some: expected list, got string".
- Here is my code below. What format is expecting for "include_property_group"?
...
Even when you have one property group it should be a list with one entry, not just a single string, as you have passed. If you take a look on 'filter_some', you will see that expected type is list, not something else (list of ids, not just one id itself - even when it's alone). Wrap your id' string with array.
toki4004
3 years agoHelpful | Level 5
I've been struggling getting my properties to show. I created a template fine, assigned a property to an item, and now I want to view a folder list with items + see their properties. I get this error:
- "Error in call to API function "files/list_folder": request body: include_property_groups.filter_some: expected list, got string".
- Here is my code below. What format is expecting for "include_property_group"?
$meta = array(
".tag" => "filter_some",
"filter_some" => "ptid:-ynhqttM3GkAAAAAAAAeOg"
);
$fields = array(
"path" => "/folder 2",
"include_property_groups" => $meta,
"recursive" => false,
"include_media_info" => false,
"include_deleted" => false,
"include_has_explicit_shared_members" => false,
"include_mounted_folders" => false
);
$headers = array(
'Authorization: Bearer ' . $auth_token,
'Content-Type: application/json'
);
$ch = curl_init();
curl_setopt( $ch, CURLOPT_POSTFIELDS, json_encode( $fields ) );
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
curl_setopt( $ch, CURLOPT_CUSTOMREQUEST, "POST" );
curl_setopt( $ch, CURLOPT_HTTPHEADER, $headers );
curl_setopt( $ch, CURLOPT_URL, 'https://api.dropboxapi.com/2/files/list_folder' );
Здравко
3 years agoLegendary | Level 20
toki4004 wrote:..., and now I want to view a folder list with items + see their properties. I get this error:
"Error in call to API function "files/list_folder": request body: include_property_groups.filter_some: expected list, got string".
Here is my code below. What format is expecting for "include_property_group"?
...
Even when you have one property group it should be a list with one entry, not just a single string, as you have passed. If you take a look on 'filter_some', you will see that expected type is list, not something else (list of ids, not just one id itself - even when it's alone). Wrap your id' string with array.
- toki40043 years agoHelpful | Level 5
OMG it worked. I am so happy! Thanks a lot!
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
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, Facebook or Instagram.
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!