B2: Auth error (401)

On and after about 6:00 today UTC, duplicacy (duplicacy_linux_x64_2.2.2) caused authorization error (401) when executing list sub-command to B2 cloud storage. The error message is as follows:

[0] URL request ‘POST https://api002.backblazeb2.com/b2api/v1/b2_list_buckets’ returned 401

I tried using older version (2.1.2) but not succeeded. And other Linux machine causes the same error, too.

Then I have read B2 API doc. and noticed that it describes about API v2 but duplicacy uses v1 like (shortened URLs):

In B2 doc: b2api/v2/b2_authorize_account
In duplicacy: b2api/v1/b2_authorize_account

So, I tried patching duplicacy to use API v2 for b2_authorize_account and others, but it didn’t work (causes 401 error).

Please fix this problem.


PS. The error occurs when using B2 AP key. Not occurs when using master key.


i got the same issue.
I identified the root cause and put a fix in Bugfix [B2]: Add BucketName to API call in FindBucket function by philband · Pull Request #570 · gilbertchen/duplicacy · GitHub



Thank you @philb. I took your fix and made a new CLI release 2.2.3.

If you’re using the web GUI you just need to restart the program which will automatically download the new CLI version.

Thanks for the fix. Now, duplicacy runs without errors.

PS. Simultaneously, B2 engineering team has fixed their server and older duplicacy can now use AP key as before.

1 Like