Hi there. I'm trying to add custom tags to files shared by a team. I'm unable to add properties and get a returned reponse "Restricted content." Searched for answers, didn't find any that helped.
Perhaps I'm not using the API as designed? These are the steps I've taken:
1. Create a template (with an admin-level token) using "/2/file_properties/templates/add_for_team"
2. Add properties (with a non-admin-level token) using "/2/file_properties/properties/add"
In step #1, I get a response with a template id, that's good.
In step #2, I specify fields with the same name as I set in the template so that they match. I use a token that is issued at a User level (not Business).
But no dice. What am I doing wrong? Here are the requests:
1:
curl -X POST https://api.dropboxapi.com/2/file_properties/templates/add_for_team \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{"name":"Tags","description":"tags template","fields":[{"name":"practice","description":"equity, transformation, etc.","type":{".tag":"string"}},{"name":"project","description":"Kuja Kuja, Steps, etc.","type":{".tag":"string"}},{"name":"partner","description":"Chase, ARC, etc.","type":{".tag":"string"}},{"name":"filetype","description":"png, ai, pdf, etc.","type":{".tag":"string"}},{"name":"medium","description":"web, mobile, print, etc.","type":{".tag":"string"}},{"name":"category","description":"report, wireframes, template, capture, etc.","type":{".tag":"string"}}]}'
2:
curl -X POST https://api.dropboxapi.com/2/file_properties/properties/add \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{"path":"/Dev Assets/design_library/design_library_mockup.png","property_groups":[{"template_id":"ptid:g1CLXU7Z6l8AAAAAAEJ1KA","fields":[{"name":"practice","value":".org"},{"name":"project","value":"design library"},{"name":"partner","value":"daniel feldman, michael zhong"},{"name":"filetype","value":"png"},{"name":"medium","value":"web"},{"name":"category","value":"mockup"},{"name":"contributors","value":"daniel fledman, michael zhong"}]}]}'