Skip to main content

Get token

Gets token based on the code from the GetAuthorizationLink page

Function GetToken(Val AppKey, Val AppSecret, Val Code) Export

ParameterCLI optionTypeRequiredDescription
AppKey--appkeyStringApplication key
AppSecret--appsecretStringApplication secret
Code--codeStringCode from the authorization page

Returns: Map Of KeyAndValue - serialized JSON response from Dropbox


1C:Enterprise/OneScript code example
    AppKey    = "oynqxds...";
AppSecret = "tk2oewn...";
Code = "bTCiUTzxe6kAAAAAAAAAGN1NMZIxyqETKr4o7OS2dU8";

Result = OPI_Dropbox.GetToken(AppKey, AppSecret, Code);
    oint dropbox GetToken \
--appkey "***" \
--appsecret "***" \
--code "bTCiUTzxe6kAAAAAAAAAGN1NMZIxyqETKr4o7OS2dU8"
Result
{
"error": "invalid_grant",
"error_description": "code doesn't exist or has expired"
}