Click or drag to resize

DropboxOAuth2HelperGetAuthorizeUri Method (OAuthResponseType, String, String, String, Boolean, Boolean, String, Boolean, TokenAccessType, String, IncludeGrantedScopes, String)

Gets the URI used to start the OAuth2.0 authorization flow.

Namespace:  Dropbox.Api
Assembly:  Dropbox.Api (in Dropbox.Api.dll) Version: 5.0
public static Uri GetAuthorizeUri(
	OAuthResponseType oauthResponseType,
	string clientId,
	string redirectUri = null,
	string state = null,
	bool forceReapprove = false,
	bool disableSignup = false,
	string requireRole = null,
	bool forceReauthentication = false,
	TokenAccessType tokenAccessType = TokenAccessType.Legacy,
	string[] scopeList = null,
	IncludeGrantedScopes includeGrantedScopes = IncludeGrantedScopes.None,
	string codeChallenge = null


Type: Dropbox.ApiOAuthResponseType
The grant type requested, either Token or Code.
Type: SystemString
The apps key, found in the App Console.
redirectUri (Optional)
Type: SystemString
Where to redirect the user after authorization has completed. This must be the exact URI registered in the App Console; even localhost must be listed if it is used for testing. A redirect URI is required for a token flow, but optional for code. If the redirect URI is omitted, the code will be presented directly to the user and they will be invited to enter the information in your app.
state (Optional)
Type: SystemString
Up to 500 bytes of arbitrary data that will be passed back to redirectUri. This parameter should be used to protect against cross-site request forgery (CSRF).
forceReapprove (Optional)
Type: SystemBoolean
Whether or not to force the user to approve the app again if they've already done so. If false (default), a user who has already approved the application may be automatically redirected to redirectUriIf true, the user will not be automatically redirected and will have to approve the app again.
disableSignup (Optional)
Type: SystemBoolean
When true (default is false) users will not be able to sign up for a Dropbox account via the authorization page. Instead, the authorization page will show a link to the Dropbox iOS app in the App Store. This is only intended for use when necessary for compliance with App Store policies.
requireRole (Optional)
Type: SystemString
If this parameter is specified, the user will be asked to authorize with a particular type of Dropbox account, either work for a team account or personal for a personal account. Your app should still verify the type of Dropbox account after authorization since the user could modify or remove the require_role parameter.
forceReauthentication (Optional)
Type: SystemBoolean
If true, users will be signed out if they are currently signed in. This will make sure the user is brought to a page where they can create a new account or sign in to another account. This should only be used when there is a definite reason to believe that the user needs to sign in to a new or different account.
tokenAccessType (Optional)
Type: Dropbox.ApiTokenAccessType
Determines the type of token to request. See TokenAccessType for information on specific types available. If none is specified, this will use the legacy type.
scopeList (Optional)
Type: SystemString
list of scopes to request in base oauth flow. If left blank, will default to all scopes for app
includeGrantedScopes (Optional)
Type: Dropbox.ApiIncludeGrantedScopes
which scopes to include from previous grants. Note: if this user has never linked the app, include_granted_scopes must be None
codeChallenge (Optional)
Type: SystemString
If using PKCE, please us the PKCEOAuthFlow object

Return Value

Type: Uri
The uri of a web page which must be displayed to the user in order to authorize the app.
See Also