sibblegp/b2blaze

401 - unauthorized on v0.2.x

Opened this issue · 3 comments

Got some simple code:

b2 = B2(B2_KEY_ID, B2_APP_KEY)
bucket = b2.buckets.get(B2_BUCKET)

That returns a 401 - unauthorized:

This happens in latest version 0.2.1 but if I roll-back to 0.1.10 there is no issue with the same code. Am I missing a change or is there an underlying issue with 0.2.1?

I got the same error.

The following code works for me. key_id & application_key are the variables with my auth details from Backblaze.

b2 = B2(key_id=key_id, application_key=application_key)

This happens to me if the app key is generated for a specific bucket. Is there a different way we're supposed to get bucket in that case?

Hey, might be worth checking out my backblaze b2 wrapper.
I don't believe it has this issue.

https://pypi.org/project/backblaze/
https://backblaze.readthedocs.io/en/latest/index.html
https://github.com/WardPearce/backblaze