How to authorize with API-token?
My code
from google.auth.api_key import Credentials
from google.cloud.storage import Client
client = Client('my-project', Credentials('my-token'))
blobs = client.list_blobs('my-bucket')
for blob in blobs:
print(blob.name)
raises
google.api_core.exceptions.Unauthorized: 401 GET
How to do this correctly?
I can’t to authorize with json because it runs in docker container and in production environment I can’t mount volume with json, only API-token in envs.