DBUserClient
Objective-C
@interface DBUserClient : DBUserBaseClient
                Swift
class DBUserClient : DBUserBaseClient
                Dropbox User API Client for all endpoints with auth type “user”.
This is the SDK user’s primary interface with the Dropbox API. Routes can be accessed via each “namespace” object in
the instance fields of its parent, DBUserBaseClient. To see a full list of the User API endpoints available,
please visit: https://www.dropbox.com/developers/documentation/http/documentation.
- 
                  
                  
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
accessTokenThe 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
accessTokenThe Dropbox OAuth 2.0 access token used to make requests.
transportConfigA wrapper around the different parameters that can be set to change network calling behavior.
DBTransportDefaultConfigoffers 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
accessTokenThe (long-lived) Dropbox OAuth 2.0 access token used to make requests.
tokenUidIdentifies a unique Dropbox account. Used for the multi Dropbox account case where client objects are each associated with a particular Dropbox account.
transportConfigA wrapper around the different parameters that can be set to change network calling behavior.
DBTransportDefaultConfigoffers 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
accessTokenProviderA
DBAccessTokenProviderthat provides access token and token refresh functionality.tokenUidIdentifies a unique Dropbox account. Used for the multi Dropbox account case where client objects are each associated with a particular Dropbox account.
transportConfigA wrapper around the different parameters that can be set to change network calling behavior.
DBTransportDefaultConfigoffers 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
accessTokenAn access token object.
oauthManagerThe oauthManager instance.
transportConfigA wrapper around the different parameters that can be set to change network calling behavior.
DBTransportDefaultConfigoffers 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
clientA
DBTransportDefaultClientused to make network requests.Return Value
An initialized instance.
 - 
                  
                  
Returns a
DBUserClientinstance that can be used to make API calls with given path root value.Declaration
Objective-C
- (nonnull DBUserClient *)withPathRoot:(nonnull DBCOMMONPathRoot *)pathRoot;Swift
func withPathRoot(_ pathRoot: DBCOMMONPathRoot) -> DBUserClientParameters
pathRootValue of the path root object which will be used as Dropbox-Api-Path-Root header.
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() -> BoolReturn Value
Whether the client currently has a non-nil OAuth 2.0 access token.
 
View on GitHub
        DBUserClient Class Reference