Hello Dropbox Community,
I'm encountering an issue when trying to add tags to files using the Dropbox API. Here’s a brief overview of my setup and the problem I’m facing:
Setup:
- API Version: Dropbox API v2
- Authentication: OAuth 2.0 with a refresh token
- Scopes: My app is configured with the necessary individual scopes, including `files.metadata.write` and `file_properties.write`.
- Functionality: I’m attempting to add custom tags to files using the `/file_properties/properties/add` endpoint.
Problem:
Despite having all the necessary permissions and the access token being generated via a refresh token with the correct scopes, I’m unable to successfully add tags to files. The API call fails, and I receive an error response, which suggests that the operation is not permitted or that there is an issue with my setup.
Here is a summary of the steps I’m taking:
1. Authorization: I authenticate using a refresh token to obtain an access token.
2. API Request: I send a POST request to the `https://api.dropboxapi.com/2/file_properties/properties/add` endpoint with the required parameters:
- `path`: The path to the file where I want to add the tag.
- `property_groups`: The tag information, including the template ID and the tag value.
3. Error: The API responds with an error indicating that the tag cannot be added.
What I’ve Tried:
- Ensured that the access token is valid and has the required scopes.
- Verified that the file path and template ID are correct.
- Tested the API call with both shared and non-shared files, and ensured that the file is accessible with the current token.
Question:
Has anyone else encountered a similar issue with adding tags using the Dropbox API? Is there something I might be missing in my setup or the API call? Any insights or suggestions would be greatly appreciated.
Thank you in advance for your help!
---
Feel free to post this in the Dropbox community forums. This detailed description should provide enough context for others to understand your issue and offer potential solutions.