ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

New WINDEV and WEBDEV 2024 feature!
Help / WLanguage / WLanguage functions / Communication / Drive functions
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Creates a connection to Dropbox.
Example
oOAuth2Param is OAuth2Parameters
oOAuth2Param.ClientID = "client_id"
oOAuth2Param.ClientSecret = "client_secret"
oOAuth2Param.RedirectionURL = "http://localhost:9000/"

oDrive is Drive
oDrive = dpDriveConnect(oOAuth2Param)
oMyOAuthParameters is OAuth2Parameters
oOAuth2Token is AuthToken
oOAuth2Token = AuthIdentify(oMyOAuthParameters)

oDrive is Drive
oDrive = dpDriveConnect(oOAuth2Token) // Dropbox
Syntax

Authenticating to Dropbox using the OAuth 2.0 protocol Hide the details

<Result> = dpDriveConnect(<Authentication parameters>)
<Result>: Drive variable
Drive variable that contains all the Dropbox connection information.
If an error occurs, the ErrorOccurred variable is set to True and an invalid variable is returned.
<Authentication parameters>: OAuth2Parameters variable
Name of the OAuth2Parameters variable that contains the authentication parameters:
  • The ClientID and ClientSecret properties must be specified.
  • The RedirectionURL property can be specified. By default, this property is set to "http://localhost:3400/".

Authenticating to Dropbox using a token (refresh token) Hide the details

<Result> = dpDriveConnect(<Authentication parameters>)
<Result>: Drive variable
Drive variable that contains all the Dropbox connection information.
If an error occurs, the ErrorOccurred variable is set to True and an invalid variable is returned.
<Authentication parameters>: AuthToken variable
Name of the AuthToken variable that contains the authentication parameters.
Remarks
It is recommended to to pass a token with a refresh token so that users do not have to log in each time the application is launched. If necessary, the token will be automatically updated.
Information needed to connect to a drive using an existing token:
Properties of the OAuth2Parameters variableValue used by the dpDriveConnect function
AuthURL"https://www.dropbox.com/oauth2/authorize"
TokenURL"https://api.dropboxapi.com/oauth2/token"
Scope"account_info.read files.content.write files.content.read files.metadata.write files.metadata.read"
RedirectionURL (Editable)"http://localhost:3400/"
Related Examples:
Drive functions Unit examples (WINDEV): Drive functions
[ + ] This example illustrates the use of Drive functions (Google Drive, Dropbox, OneDrive).
Drive functions Unit examples (WINDEV Mobile): Drive functions
[ + ] This example illustrates the use of Drive functions (Google Drive, Dropbox, OneDrive).
Business / UI classification: Business Logic
Component: wd290ggl.dll
Minimum version required
  • Version 2024
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 03/13/2024

Send a report | Local help