Created
May 15, 2022 09:55
-
-
Save ulexxander/cec6b2405f323d06575263ef26a1731c to your computer and use it in GitHub Desktop.
Google Auth getAccessToken using keyFile
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const googleAuth = new GoogleAuth({ | |
keyFile: "./google-service-account.json", | |
scopes: "https://www.googleapis.com/auth/homegraph", | |
}); | |
const accessToken = await googleAuth.getAccessToken(); | |
console.log(accessToken); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment