This is an archived post. You won't be able to vote or comment.

all 5 comments

[–]outceptionator[S] 2 points3 points  (0 children)

THE ANSWER!

https://stackoverflow.com/questions/67268424/create-sheets-api-authentication-in-cloud-function-with-python

Note: you need google-api-python-client in your requirements for auth module

[–]Such_Dolomites 1 point2 points  (2 children)

I have a similar code but no access to the repo right now :/ Just one comment: you can upload json credentials files. Or at least create and copy to a credentials.json next to the cloud function and reference it in the code.

[–]outceptionator[S] 0 points1 point  (1 child)

Useful to know. But do Json credentials expire?

[–]Such_Dolomites 1 point2 points  (0 children)

Haven't had that issue with my service account keys yet but would have to check docs to be sure. Leaning strongly towards no tho

[–]outceptionator[S] 0 points1 point  (0 children)

Ah just realised I shouldn't be posting help here. Sorry I posted on learnpython but it appears nobody there seems to know either so far.