We’re Still Here to Help (Even Over the Holidays!) - find out more here.
Forum Discussion
matthewepler
8 years agoExplorer | Level 4
Adding tags to team files
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. ...
- 8 years ago
The /2/file_properties/properties/add endpoint documents 'restricted_content' as "You do not have permission to modify this template." That can happen for a few reasons, but it sounds like in your case you're using a user access token (e.g., for a "Full Dropbox" app) to try to add file properties for a team-owned template, created via a team access token (for a "team member file access" app).
Since you used /2/file_properties/templates/add_for_team to create the template, the resulting template is owned by the team and you'll need to use a team access token for that team to use that template.
To call a user endpoint, such as /2/file_properties/properties/add, with a team access token, you should use the "member file access" feature.
Greg-DB
Dropbox Community Moderator
8 years agoThe /2/file_properties/properties/add endpoint documents 'restricted_content' as "You do not have permission to modify this template." That can happen for a few reasons, but it sounds like in your case you're using a user access token (e.g., for a "Full Dropbox" app) to try to add file properties for a team-owned template, created via a team access token (for a "team member file access" app).
Since you used /2/file_properties/templates/add_for_team to create the template, the resulting template is owned by the team and you'll need to use a team access token for that team to use that template.
To call a user endpoint, such as /2/file_properties/properties/add, with a team access token, you should use the "member file access" feature.
matthewepler
8 years agoExplorer | Level 4
Okay, thanks for the link. I'll check it out.
To clarify:
- to add tags to files shared by a team, there must be a template created with a team-owned token.
- to add tags, the request must be made with a team-owned token on behalf of an existing user
is that correct? Is this the best way to accomplish what I'm doing. The goal is create a UI for searching shared documents by tags.
Thanks!
- Greg-DB8 years ago
Dropbox Community Moderator
That's almost correct, but to clarify, there are two different kinds of property templates: user-owned (created by /2/file_properties/templates/add_for_user) and team-owned (created by /2/file_properties/templates/add_for_team).
To add file properties to a file for a team-owned property template, you need to use a team token.
You don't technically need to use a team-owned template to add file properties to a file that happens to be shared with the team. (Sharing and file properties aren't connected.)
If you want the file properties to be accessible to any user on the team though, your configuration of using a team-owned template sounds like the best setup.
- matthewepler8 years agoExplorer | Level 4Thanks for clarifying, Greg. So if a user uses a user template to create tags on a document, those are not visible to other users. Is that right? Only if I use a team template?
- Greg-DB8 years ago
Dropbox Community Moderator
That's correct.
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!