For this to properly work, you need to have a Google Service Account;
https://console.cloud.google.com/apis/credentials

Then you have to authorize that service account access to your buckets;
https://console.cloud.google.com/storage/browser
To do that, click on the ellipsis by your bucket's row and Edit object default permissions
Add user and paste the service account e-mail with owner privileges
