DBTeamClient

Objective-C

@interface DBTeamClient : DBTeamBaseClient

Swift

class DBTeamClient : DBTeamBaseClient

Dropbox Business (Team) API Client for all endpoints with auth type “team”.

This is the SDK user’s primary interface with the Dropbox Business (Team) API. Routes can be accessed via each “namespace” object in the instance fields of its parent, DBUserBaseClient. To see a full list of the Business (Team) API endpoints available, please visit: https://www.dropbox.com/developers/documentation/http/teams.

  • Identifies a unique Dropbox account. Used for the multi Dropbox account case where client objects are each associated with a particular Dropbox account.

    Declaration

    Objective-C

    @property (nonatomic, copy, readonly, nullable) NSString *tokenUid;

    Swift

    var tokenUid: String? { get }
  • Convenience initializer.

    Uses standard network configuration parameters.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithAccessToken:(nonnull NSString *)accessToken;

    Swift

    convenience init(accessToken: String)

    Parameters

    accessToken

    The Dropbox OAuth 2.0 access token used to make requests.

    Return Value

    An initialized instance.

  • Convenience initializer.

    Declaration

    Objective-C

    - (nonnull instancetype)
        initWithAccessToken:(nonnull NSString *)accessToken
            transportConfig:(nullable DBTransportDefaultConfig *)transportConfig;

    Swift

    convenience init(accessToken: String, transport transportConfig: DBTransportDefaultConfig?)

    Parameters

    accessToken

    The Dropbox OAuth 2.0 access token used to make requests.

    transportConfig

    A wrapper around the different parameters that can be set to change network calling behavior. DBTransportDefaultConfig offers a number of different constructors to customize networking settings.

    Return Value

    An initialized instance.

  • Convenience initializer.

    Declaration

    Objective-C

    - (nonnull instancetype)
        initWithAccessToken:(nonnull NSString *)accessToken
                   tokenUid:(nullable NSString *)tokenUid
            transportConfig:(nullable DBTransportDefaultConfig *)transportConfig;

    Swift

    convenience init(accessToken: String, tokenUid: String?, transport transportConfig: DBTransportDefaultConfig?)

    Parameters

    accessToken

    The Dropbox OAuth 2.0 access token used to make requests.

    tokenUid

    Identifies a unique Dropbox account. Used for the multi Dropbox account case where client objects are each associated with a particular Dropbox account.

    transportConfig

    A wrapper around the different parameters that can be set to change network calling behavior. DBTransportDefaultConfig offers a number of different constructors to customize networking settings.

    Return Value

    An initialized instance.

  • Convenience initializer.

    Declaration

    Objective-C

    - (nonnull instancetype)
        initWithAccessTokenProvider:
            (nonnull id<DBAccessTokenProvider>)accessTokenProvider
                           tokenUid:(nullable NSString *)tokenUid
                    transportConfig:
                        (nullable DBTransportDefaultConfig *)transportConfig;

    Parameters

    accessTokenProvider

    A DBAccessTokenProvider that provides access token and token refresh functionality.

    tokenUid

    Identifies a unique Dropbox account. Used for the multi Dropbox account case where client objects are each associated with a particular Dropbox account.

    transportConfig

    A wrapper around the different parameters that can be set to change network calling behavior. DBTransportDefaultConfig offers a number of different constructors to customize networking settings.

    Return Value

    An initialized instance.

  • Convenience initializer.

    Declaration

    Objective-C

    - (nonnull instancetype)
        initWithAccessToken:(nonnull DBAccessToken *)accessToken
               oauthManager:(nonnull DBOAuthManager *)oauthManager
            transportConfig:(nullable DBTransportDefaultConfig *)transportConfig;

    Swift

    convenience init(accessToken: DBAccessToken, oauthManager: DBOAuthManager, transport transportConfig: DBTransportDefaultConfig?)

    Parameters

    accessToken

    An access token object.

    oauthManager

    The oauthManager instance.

    transportConfig

    A wrapper around the different parameters that can be set to change network calling behavior. DBTransportDefaultConfig offers a number of different constructors to customize networking settings.

    Return Value

    An initialized instance.

  • Designated initializer.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithTransportClient:
        (nonnull DBTransportDefaultClient *)client;

    Swift

    init(transportClient client: DBTransportDefaultClient)

    Parameters

    client

    A DBTransportDefaultClient used to make network requests.

    Return Value

    An initialized instance.

  • Returns a DBUserClient instance that can be used to make API calls on behalf of the designated team member.

    Note

    App must have “TeamMemberFileAccess” permissions to use this method.

    Declaration

    Objective-C

    - (nonnull DBUserClient *)userClientWithMemberId:(nonnull NSString *)memberId;

    Swift

    func userClient(withMemberId memberId: String) -> DBUserClient

    Parameters

    memberId

    The Dropbox account_id of the team member to perform actions on behalf of. e.g. “dbid:12345678910…”

    Return Value

    An initialized User API client instance.

  • Returns the current access token used to make API requests.

    Declaration

    Objective-C

    - (nullable NSString *)accessToken;

    Swift

    func accessToken() -> String?
  • Returns whether the client is authorized.

    Declaration

    Objective-C

    - (BOOL)isAuthorized;

    Swift

    func isAuthorized() -> Bool

    Return Value

    Whether the client currently has a non-nil OAuth 2.0 access token.