-
Notifications
You must be signed in to change notification settings - Fork 2k
Closed
Description
I can do local auth with the below code using my service account credentials. Set in .env as GOOGLE_APPLICATION_CREDENTIALS=./service-account-key.json
try {
const auth = new google.auth.GoogleAuth({
scopes: SCOPES,
clientOptions: {
subject: "[email protected]",
},
});
const gmail = google.gmail({ version: "v1", auth });
return gmail;
} catch (e) {
console.error(e);
return null;
}
But I'm trying to figure out how to get this working on Cloud Run using the service account on there.. I assumed the auth stuff would be passed in automatically, which doesn't seem right, but also couldn't find any documentation to show otherwise. Has anyone done this before? Any alternatives I can try here?
Metadata
Metadata
Assignees
Labels
No labels