sibblegp / b2blaze

b2blaze
MIT License
609 stars 31 forks source link

401 - unauthorized on v0.2.x #36

Open Fernker opened 5 years ago

Fernker commented 5 years ago

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?

mdinesh9 commented 5 years ago

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)

justin-pierce commented 4 years ago

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?

WardPearce commented 4 years ago

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