Closed skand888 closed 3 years ago
This is because this function tries to list all buckets instead of using the bucketName option of the B2ListBucketsRequest
bucketName
B2ListBucketsRequest
default B2Bucket getBucketOrNullByName(String name) throws B2Exception { for (B2Bucket bucket : buckets()) { if (bucket.getBucketName().equals(name)) { return bucket; } } return null; }
According to B2 documentation: "If you ask for all buckets and your application key is restricted to one bucket, the call is unauthorized."
The workaround is to call listBuckets() with the bucket name as an option instead of getBucketOrNullByName().
listBuckets()
getBucketOrNullByName()
Fixed in #152
This is because this function tries to list all buckets instead of using the
bucketName
option of theB2ListBucketsRequest
According to B2 documentation: "If you ask for all buckets and your application key is restricted to one bucket, the call is unauthorized."
The workaround is to call
listBuckets()
with the bucket name as an option instead ofgetBucketOrNullByName()
.