INNER CODE UNIT · JavaScript
authorize
dotenx/dotenx · predefinedImages/tasks/create-google-spreadsheet/index.js:34
function authorize() {
const oAuth2Client = new google.auth.OAuth2();
const token = {
access_token: process.env.INTEGRATION_ACCESS_TOKEN,
refresh_token: process.env.INTEGRATION_REFRESH_TOKEN
}
oAuth2Client.setCredentials(token);
return oAuth2Client;
}
const oath2Client = authorize();
create(oath2Client, process.env.title);