Class DropboxTeamClient
The client which contains endpoints which perform team-level actions.
Implements
Inherited Members
Namespace: Dropbox.Api
Assembly: Dropbox.Api.dll
Syntax
public sealed class DropboxTeamClient : DropboxClientBase, IDisposable
Constructors
View SourceDropboxTeamClient(string)
Initializes a new instance of the DropboxTeamClient class.
Declaration
public DropboxTeamClient(string oauth2Token)
Parameters
| Type | Name | Description |
|---|---|---|
| string | oauth2Token | The oauth2 access token for making client requests. |
DropboxTeamClient(string, DropboxClientConfig)
Initializes a new instance of the DropboxTeamClient class.
Declaration
public DropboxTeamClient(string oauth2AccessToken, DropboxClientConfig config)
Parameters
| Type | Name | Description |
|---|---|---|
| string | oauth2AccessToken | The oauth2 access token for making client requests. |
| DropboxClientConfig | config | The DropboxClientConfig. |
DropboxTeamClient(string, DateTime)
Initializes a new instance of the DropboxTeamClient class.
Declaration
public DropboxTeamClient(string oauth2AccessToken, DateTime oauth2AccessTokenExpiresAt)
Parameters
| Type | Name | Description |
|---|---|---|
| string | oauth2AccessToken | The oauth2 access token for making client requests. |
| DateTime | oauth2AccessTokenExpiresAt | The time when the current access token expires, can be null if using long-lived tokens. |
DropboxTeamClient(string, DateTime, DropboxClientConfig)
Initializes a new instance of the DropboxTeamClient class.
Declaration
public DropboxTeamClient(string oauth2AccessToken, DateTime oauth2AccessTokenExpiresAt, DropboxClientConfig config)
Parameters
| Type | Name | Description |
|---|---|---|
| string | oauth2AccessToken | The oauth2 access token for making client requests. |
| DateTime | oauth2AccessTokenExpiresAt | The time when the current access token expires, can be null if using long-lived tokens. |
| DropboxClientConfig | config | The DropboxClientConfig. |
DropboxTeamClient(string, string)
Initializes a new instance of the DropboxTeamClient class.
Declaration
public DropboxTeamClient(string oauth2RefreshToken, string appKey)
Parameters
| Type | Name | Description |
|---|---|---|
| string | oauth2RefreshToken | The oauth2 access token for making client requests. |
| string | appKey | The app key to be used for refreshing tokens. |
DropboxTeamClient(string, string, DropboxClientConfig)
Initializes a new instance of the DropboxTeamClient class.
Declaration
public DropboxTeamClient(string oauth2RefreshToken, string appKey, DropboxClientConfig config)
Parameters
| Type | Name | Description |
|---|---|---|
| string | oauth2RefreshToken | The oauth2 access token for making client requests. |
| string | appKey | The app key to be used for refreshing tokens. |
| DropboxClientConfig | config | The DropboxClientConfig. |
DropboxTeamClient(string, string, DateTime, string)
Initializes a new instance of the DropboxTeamClient class.
Declaration
public DropboxTeamClient(string oauth2AccessToken, string oauth2RefreshToken, DateTime oauth2AccessTokenExpiresAt, string appKey)
Parameters
| Type | Name | Description |
|---|---|---|
| string | oauth2AccessToken | The oauth2 access token for making client requests. |
| string | oauth2RefreshToken | The oauth2 refresh token for refreshing access tokens. |
| DateTime | oauth2AccessTokenExpiresAt | The time when the current access token expires, can be null if using long-lived tokens. |
| string | appKey | The app key to be used for refreshing tokens. |
DropboxTeamClient(string, string, DateTime, string, DropboxClientConfig)
Initializes a new instance of the DropboxTeamClient class.
Declaration
public DropboxTeamClient(string oauth2AccessToken, string oauth2RefreshToken, DateTime oauth2AccessTokenExpiresAt, string appKey, DropboxClientConfig config)
Parameters
| Type | Name | Description |
|---|---|---|
| string | oauth2AccessToken | The oauth2 access token for making client requests. |
| string | oauth2RefreshToken | The oauth2 refresh token for refreshing access tokens. |
| DateTime | oauth2AccessTokenExpiresAt | The time when the current access token expires, can be null if using long-lived tokens. |
| string | appKey | The app key to be used for refreshing tokens. |
| DropboxClientConfig | config | The DropboxClientConfig. |
DropboxTeamClient(string, string, DateTime, string, string)
Initializes a new instance of the DropboxTeamClient class.
Declaration
public DropboxTeamClient(string oauth2AccessToken, string oauth2RefreshToken, DateTime oauth2AccessTokenExpiresAt, string appKey, string appSecret)
Parameters
| Type | Name | Description |
|---|---|---|
| string | oauth2AccessToken | The oauth2 access token for making client requests. |
| string | oauth2RefreshToken | The oauth2 refresh token for refreshing access tokens. |
| DateTime | oauth2AccessTokenExpiresAt | The time when the current access token expires, can be null if using long-lived tokens. |
| string | appKey | The app key to be used for refreshing tokens. |
| string | appSecret | The app secret to be used for refreshing tokens. |
DropboxTeamClient(string, string, DateTime, string, string, DropboxClientConfig)
Initializes a new instance of the DropboxTeamClient class.
Declaration
public DropboxTeamClient(string oauth2AccessToken, string oauth2RefreshToken, DateTime oauth2AccessTokenExpiresAt, string appKey, string appSecret, DropboxClientConfig config)
Parameters
| Type | Name | Description |
|---|---|---|
| string | oauth2AccessToken | The oauth2 access token for making client requests. |
| string | oauth2RefreshToken | The oauth2 refresh token for refreshing access tokens. |
| DateTime | oauth2AccessTokenExpiresAt | The time when the current access token expires, can be null if using long-lived tokens. |
| string | appKey | The app key to be used for refreshing tokens. |
| string | appSecret | The app secret to be used for refreshing tokens. |
| DropboxClientConfig | config | The DropboxClientConfig. |
DropboxTeamClient(string, string, string)
Initializes a new instance of the DropboxTeamClient class.
Declaration
public DropboxTeamClient(string oauth2RefreshToken, string appKey, string appSecret)
Parameters
| Type | Name | Description |
|---|---|---|
| string | oauth2RefreshToken | The oauth2 refresh token for refreshing access tokens. |
| string | appKey | The app key to be used for refreshing tokens. |
| string | appSecret | The app secret to be used for refreshing tokens. |
DropboxTeamClient(string, string, string, DropboxClientConfig)
Initializes a new instance of the DropboxTeamClient class.
Declaration
public DropboxTeamClient(string oauth2RefreshToken, string appKey, string appSecret, DropboxClientConfig config)
Parameters
| Type | Name | Description |
|---|---|---|
| string | oauth2RefreshToken | The oauth2 refresh token for refreshing access tokens. |
| string | appKey | The app key to be used for refreshing tokens. |
| string | appSecret | The app secret to be used for refreshing tokens. |
| DropboxClientConfig | config | The DropboxClientConfig. |
DropboxTeamClient(string, string, string, string, DropboxClientConfig)
Initializes a new instance of the DropboxTeamClient class.
Declaration
public DropboxTeamClient(string oauth2AccessToken, string oauth2RefreshToken, string appKey, string appSecret, DropboxClientConfig config)
Parameters
| Type | Name | Description |
|---|---|---|
| string | oauth2AccessToken | The oauth2 access token for making client requests. |
| string | oauth2RefreshToken | The oauth2 refresh token for refreshing access tokens. |
| string | appKey | The app key to be used for refreshing tokens. |
| string | appSecret | The app secret to be used for refreshing tokens. |
| DropboxClientConfig | config | The DropboxClientConfig. |
Properties
View SourceFileProperties
Gets the FileProperties routes.
Declaration
public FilePropertiesTeamRoutes FileProperties { get; }
Property Value
| Type | Description |
|---|---|
| FilePropertiesTeamRoutes |
Team
Gets the Team routes.
Declaration
public TeamTeamRoutes Team { get; }
Property Value
| Type | Description |
|---|---|
| TeamTeamRoutes |
TeamLog
Gets the TeamLog routes.
Declaration
public TeamLogTeamRoutes TeamLog { get; }
Property Value
| Type | Description |
|---|---|
| TeamLogTeamRoutes |
Methods
View SourceAsAdmin(string)
Convert the team client to a user client which can perform action on team owned contents. See documentation for Dropbox-API-Select-Admin for detail.
Declaration
public DropboxClient AsAdmin(string adminId)
Parameters
| Type | Name | Description |
|---|---|---|
| string | adminId | The member id of a team admin. |
Returns
| Type | Description |
|---|---|
| DropboxClient | The DropboxClient. |
AsMember(string)
Convert the team client to a user client which can perform action on the given team member's Dropbox.
Declaration
public DropboxClient AsMember(string memberId)
Parameters
| Type | Name | Description |
|---|---|---|
| string | memberId | The member id of a user who is in the team. |
Returns
| Type | Description |
|---|---|
| DropboxClient | The DropboxClient. |
GetAccessTokenSnapshot()
Reads the cached access token and expiration without network requests or refresh.
Declaration
public AccessTokenSnapshot GetAccessTokenSnapshot()
Returns
| Type | Description |
|---|---|
| AccessTokenSnapshot | An immutable snapshot, or null if no access token is cached. |
Remarks
The token may be expired or revoked; reading the cache does not validate it. Expiration is UTC, or null if unknown (which does not imply an unlimited lifetime). The access token is sensitive and must not be logged or disclosed.
RefreshAccessToken(string[])
Refreshes access token regardless of if existing token is expired.
Declaration
public Task<bool> RefreshAccessToken(string[] scopeList)
Parameters
| Type | Name | Description |
|---|---|---|
| string[] | scopeList | subset of scopes to refresh token with, or null to refresh with all scopes. |
Returns
| Type | Description |
|---|---|
| Task<bool> | true if token is successfully refreshed, false otherwise. |