ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

New WINDEV, WEBDEV and WINDEV Mobile 2024 feature!
Help / WLanguage / WLanguage functions / Communication / Managing the OAuth 2.0 protocol
  • See Also
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 web service access token from a token description in JSON format.
Example
// Token description in JSON format
jsToken is JSON
jsToken.access_token = "iskrfbj65zKJHSFD"
jsToken.refresh_token = "LAJ5Vkjjnl54KJHK56354"
jsToken.token_type = "bearer"
jsToken.expires = 3600

// Date and time the token was retrieved
dtRetrieved is DateTime = "20230103101933000"

// Token importation
MyToken is AuthToken = AuthImportToken(jsToken, dtRetrieved)
Syntax
<Result> = AuthImportToken(<JSON description> [, <JSON date and time retrieved>])
<Result>: AuthToken variable
AuthToken variable corresponding to the description in JSON format.
If an error occurs, the ErrorOccurred variable is set to True and ErrorInfo returns the corresponding error message.-
<JSON description>: Character string
JSON description of the web service access token (usually returned by an HTTP request sent to the web service).
<JSON date and time retrieved>: Optional DateTime
Date and time the token description was retrieved from the web service.
Remark: the JSON description of a token returned by a web service contains a token validity period. To determine the token's expiration date and time, you need to specify the date and time the token description was retrieved from the web service.
If not specified, this parameter will correspond to the current date and time (returned by SysDateTime).
Minimum version required
  • Version 2024
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 03/05/2024

Send a report | Local help