I'm trying the following code to access the Google Cloud storage:
client = storage.Client(credentials = GoogleCredentials.from_stream(<path-to-service-account-json>))
Throws this error:
ValueError: This library only supports credentials from google-auth-library-python. See https://google-cloud-python.readthedocs.io/en/latest/google-cloud-auth.html for help on authentication with this library.
I'm able to authenticate discovery.build
service using the same credentials(obtained using GoogleCredentials.from_stream()
), but for some reason storage.Client fails to use the provided credentials.
Please let me know if I'm missing something.