Learn R Programming

backblazer (version 0.1.0)

b2AuthorizeAccount: Authorise Backblaze B2 Account.

Description

b2AuthorizeAccount authorises an account on Backblaze's B2 cloud storage product.

Usage

b2AuthorizeAccount(url, accountId, authorizationKey)

Arguments

url
Specific API endpoint address for this function. See examples.
accountId
Account identification code for the relevant Backblaze B2 account. This may be obtained by clicking Show Account ID and Application Key hypertext from the B2 My Account area, after logging in with a web browser.
authorizationKey
Account authorisation key for the relevant Backblaze B2 account. This may be obtained by clicking Show Account ID and Application Key hypertext from the B2 My Account area, after logging in with a web browser.

Value

If successful, an authorisation token will be returned and stored in an Rds file called accountAuthorization.Rds in the current working directory. The data in this Rds file will be used in all other functions in this package. Specific B2 documentation regarding this API call can be found here:https://www.backblaze.com/b2/docs/b2_authorize_account.html

Note

Consider programmtically deleting accountAuthorization.Rds on exit.

Details

This authorisation function must be executed first, before any other functions in this package. Failure to execute b2AuthorizeAccount renders everything else pointless. You will require a valid Backblaze B2 accountId and authorizationKey. Create a Backblaze B2 account and obtain your access credentials here:

https://www.backblaze.com/b2/cloud-storage.html

Further documentation regarding the Backblaze B2 Cloud Storage API is available here:

https://www.backblaze.com/b2/docs/

API account authorization url, accountId, authorizationKey are all mandatory and must be user defined.

Every time b2AuthorizeAccount is executed, a new login to Backblaze B2 occurs. Don't login more than is necessary.

Examples

Run this code
## Not run: 
# b2AuthorizeAccount(url = "https://api.backblaze.com/b2api/v1/b2_authorize_account",
# accountId = "YourAccountId",
# authorizationKey = "YourAuthorisationKey")
# ## End(Not run)

Run the code above in your browser using DataLab