instead of gcloud auth login
try with gcloud auth login --enable-gdrive-access
another solution which i employed at the time was to access the sqllite db used by gcloud to store creds, fetch token and refresh token from there, pass it to the gcloud sheets api with sheet id to access it. I dont think this is required anymore, but just fyi