Need to see if your shared folder is taking up space on your dropbox 👨💻? Find out how to check here.
Forum Discussion
cblokAlly
2 months agoExplorer | Level 3
Team access not permitted
I have created an app with team scopes, and used a Team admin account to authorize and generate access tokens, following the Oauth guide. I am still hit with errors for multiple business API end points. I even registered this account for a 'Dropbox Business Development' account which was supposed to allow 'testing' for business endpoints but I am met with the same errors. I am referencing the Business and User Endpoint documentation here.
For example; '2/sharing/mount_folder' leads to "Unexpected select user header. Your app does not have permission to use this feature"
'2/team/members/get_info' leads to 'This token is not associated with a team" error_type:USER_AUTH_NOT_ALLOWED'
I am running out of workaround and tests, what am I missing? How do I use my Team account to authorize a 'team' token/app so that I can act on behalf of my team members?
6 Replies
- DB-Des2 months ago
Dropbox Community Moderator
Hi cblokAlly
I'll be happy to help with any issues you're having with the Dropbox API, but I'll need some more information. Please reply with:
- the name and version number of the platform and SDK/library you are using, if any
- the steps to reproduce the issue, including relevant code snippet(s), but don't include any access or refresh token(s)
- 5-10 different 'X-Dropbox-Request-Id' response header values encountering the issue
- cblokAlly2 months agoExplorer | Level 3
Hello DB-Des,
I appreciate the help. I’m not using an SDK or platform library, I’m using different action nodes within Zapier, specifically “Dropbox API Request (Beta)” action, which makes direct HTTPS API calls to Dropbox endpoints.
Steps to get Access token:
- I created an App with Team scopes, and used the App Key to create an authorization URL: 'https://www.dropbox.com/oauth2/authorize?response_type=code&client_id={MY_APP_KEY}&token_access_type=offline'
- I then authorize the app, and extract the Authorization code, this code is used in a call to 'api.dropboxapi.com/oauth2/token' with the grant type=authorization_code
- When doing this through VS Studio's powershell, I can confirm this is related to a Team as the Team ID is provided, and the listed scopes include all selected team permissions
- The refresh token will be stored for future calls to automate the workflow
- I use the access token provided to take actions on Team endpoints and am met with errors
General workflow steps:
- My Zap triggers when a new record is created externally, it does various Zapier steps before utilizing the Create Folder action, which allows me to build a folder within a Team space.
- I then use the Dropbox API Request (Beta) action to call '2/sharing/share_folder', this succeeds and provides the shared folder ID
- I use the shared folder ID to call on '2/sharing/add_folder_member' endpoint and provide an email queried earlier, this succeeds as well, but the folder is not mounted in the Team root folder on that users end
- I am attempting to work around the mounting with Team/business endpoint actions and the access token granted above
- /2/team/members/get_info
- /2/team/get_info
- /2/sharing/mount_folder
- On each endpoint I am met with errors
X-Dropbox-Request-Id values:
- /2/team/members/get_info_v2 - message:"This token is not associated with a team" error_type:USER_AUTH_NOT_ALLOWED
- /2/team/get_info - message:"This token is not associated with a team" error_type:USER_AUTH_NOT_ALLOWED
- /2/sharing/mount_folder - Unexpected select user header. Your app does not have permission to use this feature
I haven't tried accessing more Team endpoints, and I am met with the same response for each of these, so I apologize for not providing 5-10. I am trying to automate this with minimal API calls/code, but if more calls are necessary to achieve what I'm doing please let me know and I can look into that for the responses/solutions.
Please let me know if there is other detail I can provide. Thank you!
- iNeil2 months ago
Dropbox Community Moderator
Hi cblokAlly,
The error message "This token is not associated with a team" indicates that you're attempting to call a team endpoint using an access token that is not connected to a team. In order to call team endpoints, you'd need an access token authorized with team scopes. You can find more information on scopes in the OAuth Guide and authorization documentation.
Similarly, the "Unexpected select user header" error indicates that your app cannot use the "Member file access" feature. Please refer to the Member file access documentation here for more information on the requirements for using that. Please cross check the access token that you are using and that its connected to a team.
If you would like us to troubleshoot the issue further such as reviewing your API app, please open an API ticket using the following link:
https://www.dropbox.com/developers/contact
- cblokAlly2 months agoExplorer | Level 3
Hello iNeil,
I am aware that it implies it's not a team token, but as I explained I am absolutely authorizing team scopes, which is confirmed in the response when I request the token. I have heavily reviewed the documentation you provided, I linked it in the original message. If selecting the permission scopes for teams (as laid out in the documentation) and authorizing the app, as well as seeing the Team ID and team scopes in the token request response is not considered 'connected to a team token' how do I do that?
If you are unable to answer this, I will move forward with submitting a ticket, but I have seemingly followed the documentation correctly and can't get further help from it.
- iNeil2 months ago
Dropbox Community Moderator
Hi cblokAlly,
Thank you for the additional information. If the Team ID and team scopes are included in the token request response, it indicates that the access token is team-linked. That said, please open an API ticket to further troubleshoot the issue using the following link:
- lendy7716 days agoNew member | Level 2
How did it end up?
About Discuss Dropbox Developer & API
Make connections with 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!