cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
What’s new: end-to-end encryption, Replay and Dash updates. Find out more about these updates, new features and more here.

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Re: Calling Methods "asTeamMember" dropbox V2 api .NET

Calling Methods "asTeamMember" dropbox V2 api .NET

Filip J.1
New member | Level 1

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

3 Replies 3

Greg-DB
Dropbox 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.1
New 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-DB
Dropbox 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.

Need more support?