For documentation purposes, I suggest you change "KEY" to access_token. KEY can be confused with the Project specific OAuth service key. Access token (or token) is the correct OAuth term.
Also, for folks struggling with out-of-date tokens: If you create your own authClient = new google.auth.OAuth2(...) client (from googleapis) with the access_token and refresh_token (e.g., retrieved via passport) then you can call client.refreshAccessToken() to get an updated access_token.
Reference:
https://github.com/google/google-api-nodejs-client/#manually-refreshing-access-token
Thanks for building this lib. Google really sucks at supporting their own APIs.
For documentation purposes, I suggest you change
"KEY"toaccess_token. KEY can be confused with the Project specific OAuth service key. Access token (or token) is the correct OAuth term.Also, for folks struggling with out-of-date tokens: If you create your own
authClient = new google.auth.OAuth2(...)client (from googleapis) with theaccess_tokenandrefresh_token(e.g., retrieved via passport) then you can callclient.refreshAccessToken()to get an updatedaccess_token.Reference:
https://github.com/google/google-api-nodejs-client/#manually-refreshing-access-token
Thanks for building this lib. Google really sucks at supporting their own APIs.