We're making changes to the Community, so you may have received some notifications - thanks for your patience and welcome back. Learn more here.
Forum Discussion
Filip J.1
9 years agoNew member | Level 1
Calling Methods "asTeamMember" dropbox V2 api .NET
In the V1 api you have the option to make a call as a team member that will:
<param name="asTeamMember">Specify the member_id of the user that the app wants to act on.</param>
This is the old V1 ListRevisionAsync:
Task<IEnumerable<MetaData>> RevisionsAsync(string path, int rev_limit = 10, string locale = null, string asTeamMember = null, CancellationToken cancellationToken = default(CancellationToken));
In the new dropbox you can perform an action AsMember.
What is the difference between performing an api call such as FilesRoutes.ListRevisionsAsync using just the path or using a team client with as a AsMember call and then doing the api call?
Client.ListRevisionAsync(path)
Client.AsMember(asTeamMember).ListRevisionAsync(path)
What is the difference between these two calls exactly? How does calling it from a different user matter?
Thanks
- Greg-DBDropbox Staff
The ListRevisionAsync method is always specific to a single user, and it takes a path parameter to identify the path inside that user's account.
In the first example, Client.ListRevisionAsync(path), the client object needs to be for a "user-linked" API app, where the app is linked to a specific user. This would be a DropboxClient object.
If your app is registered for the "Full Dropbox" permission, for instance, your app is a user-linked app.
In the second example, Client.AsMember(asTeamMember).ListRevisionAsync(path), the client object would be for a "team-linked API app. For this kind of API app, the app is connected to the Dropbox for Business team itself, not a single user. This would be a DropboxTeamClient object. That being the case, by default there is no specific user to operate on. That's why AsMember is necessary to specify which member of the team to operate on.
If your app is registered for the "Team information" permission, for instance, your app is a team-linked app.
- Filip J.1New member | Level 1
If I am registered as a "team-linked" app, would I be allowed to make an instance of the DropboxClient and make a call to Client.ListRevisionAsync(path) without a teamMemberId since the method does not ask for one?
Would making a call from the DropboxClient as a "team-linked" app return different results?
- Greg-DBDropbox Staff
No, attempting to make a user call like ListRevisionAsync with a DropboxClient with a team-linked access token would just fail with an error message explaining the issue.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
5,875 PostsLatest Activity: 3 hours agoIf 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 or Facebook.
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!