ashusvirus
ashusvirus

Reputation: 412

Google service account gives UNAUTHENTICATED error

My code runs smoothly on the local server. On GCP server where python server is started as a linux systemd service, after few hours of restart it gives me

Request had invalid authentication credentials. Expected OAuth 2 access token, login cookie or other valid authentication credential.

Im using gspread to access google spreadsheets.

Scope "https://www.googleapis.com/auth/spreadsheets"

Upvotes: 0

Views: 999

Answers (1)

ashusvirus
ashusvirus

Reputation: 412

Issue in gspread can be fixed using

client.login()

Issue on Github

Upvotes: 1

Related Questions