I need to use python to access files on google cloud storage. I'm using the following code -
from google.cloud import storage
client = storage.Client.from_service_account_json('json/file/path')
bucket = client.get_bucket('demo')
I get the following error -
google.api_core.exceptions.Forbidden: 403 GET https://www.googleapis.com/storage/v1/b/iot-demo?projection=noAcl: [email protected] does not have storage.buckets.get access to demo.
Google Storage JSON API is enabled, I have given the 'storageaccess' account the 'Storage Admin' role. I have also tried giving the 'Project Owner' role.