B2: Error 401 on lock deletion

Hi everyone
I get a 401 error when restic tries to remove the lock after an update or view request to the repository at backblaze:
I first checked if the repository exist, then I created the repository and finally I tried to show the snapshots again. The same issue appears when I backup a file/directory or show the master key for example.

root@587469b95e8b:~# restic snapshots
Fatal: unable to open config file: Stat: b2_download_file_by_name: 404: File with such name does not exist.
Is there a repository at the following location?
b2:pg-backup:backup-test-restic-1/
root@587469b95e8b:~# echo $?
1
root@587469b95e8b:~# restic init
created restic repository feaa0ba007 at b2:pg-backup:backup-test-restic-1/

Please note that knowledge of your password is required to access
the repository. Losing your password means that your data is
irrecoverably lost.
root@587469b95e8b:~# restic snapshots
repository feaa0ba0 opened successfully, password is correct
created new cache in /app/pg-backup/.cache/restic
Remove(<lock/c887ed5465>) returned error, retrying after 552.330144ms: Delete: b2_delete_file_version: 401: 
Remove(<lock/c887ed5465>) returned error, retrying after 1.080381816s: Delete: b2_delete_file_version: 401: 
Remove(<lock/c887ed5465>) returned error, retrying after 1.31013006s: Delete: b2_delete_file_version: 401: 
Remove(<lock/c887ed5465>) returned error, retrying after 1.582392691s: Delete: b2_delete_file_version: 401: 
Remove(<lock/c887ed5465>) returned error, retrying after 2.340488664s: Delete: b2_delete_file_version: 401: 
Remove(<lock/c887ed5465>) returned error, retrying after 4.506218855s: Delete: b2_delete_file_version: 401: 
Remove(<lock/c887ed5465>) returned error, retrying after 3.221479586s: Delete: b2_delete_file_version: 401: 
Remove(<lock/c887ed5465>) returned error, retrying after 5.608623477s: Delete: b2_delete_file_version: 401: 
Remove(<lock/c887ed5465>) returned error, retrying after 7.649837917s: Delete: b2_delete_file_version: 401: 
Remove(<lock/c887ed5465>) returned error, retrying after 15.394871241s: Delete: b2_delete_file_version: 401: 
Remove(<lock/c887ed5465>) returned error, retrying after 507.606314ms: Delete: b2_delete_file_version: 401: 
Remove(<lock/c887ed5465>) returned error, retrying after 985.229971ms: Delete: b2_delete_file_version: 401: 
Remove(<lock/c887ed5465>) returned error, retrying after 803.546856ms: Delete: b2_delete_file_version: 401: 
Remove(<lock/c887ed5465>) returned error, retrying after 1.486109007s: Delete: b2_delete_file_version: 401: 
Remove(<lock/c887ed5465>) returned error, retrying after 2.070709754s: Delete: b2_delete_file_version: 401: 
Remove(<lock/c887ed5465>) returned error, retrying after 3.67875363s: Delete: b2_delete_file_version: 401: 
Remove(<lock/c887ed5465>) returned error, retrying after 4.459624189s: Delete: b2_delete_file_version: 401: 
Remove(<lock/c887ed5465>) returned error, retrying after 6.775444383s: Delete: b2_delete_file_version: 401: 
Remove(<lock/c887ed5465>) returned error, retrying after 15.10932531s: Delete: b2_delete_file_version: 401: 
Remove(<lock/c887ed5465>) returned error, retrying after 13.811796615s: Delete: b2_delete_file_version: 401: 
error in cleanup handler: Delete: b2_delete_file_version: 401: 

I configured the credentials and the repository via environment variables. I already tried to use the no-lock option, but this does not help for the backup operation.
The account I use has the following capabilities in b2:
writeFiles,readFiles,listFiles,deleteFiles

Do you have any ideas what I am missing?

I found the problem by myself after hours of debugging. Maybe it helps somebody else in the future.
The b2 account needs the following capabilities at least:
writeFiles,readFiles,listFiles,deleteFiles,listBuckets
Otherwise it cannot operate properly.
I in my case the account lacked the listBuckets capability.