IPWorks Cloud 2020 C++ Edition

Questions / Feedback?

Authorize Method

Authenticates the class with the server using the current application key and Id.

Syntax

ANSI (Cross Platform)
int Authorize();

Unicode (Windows)
INT Authorize();
- (void)authorize;
#define MID_BACKBLAZEB2_AUTHORIZE 5

IPWORKSCLOUD_EXTERNAL int IPWORKSCLOUD_CALL IPWorksCloud_BackblazeB2_Do(void *lpObj, int methid, int cparam, void *param[], int cbparam[], int64 *lpllVal);

Remarks

This method authenticates the class with the server using the values held by ApplicationKey and ApplicationKeyId. A successful call to this method will clear and repopulate the following:

  • Account* properties
  • APIURL configuration setting
  • DownloadURL configuration setting
  • FragmentSize configuration setting (if necessary; refer to its documentation for more information)
  • SimpleUploadLimit configuration setting (if necessary; refer to its documentation for more information)

The class must authenticate with the server before any other requests can be attempted; the class will call it automatically if necessary. As part of the authentication process, the server returns an authorization token which must be used to authorize all further requests; this token is valid for up to 24 hours. When it expires, this method must be called again.

Error Handling (C++)

This method returns a result code; 0 indicates success, while a non-zero error code indicates that this method encountered an error during its execution. If an error occurs, the GetLastError() method can be called to retrieve the associated error message. (Note: This method's result code can also be obtained by calling the GetLastErrorCode() method after it returns.)

Copyright (c) 2022 /n software inc. - All rights reserved.
IPWorks Cloud 2020 C++ Edition - Version 20.0 [Build 8265]