I'm following the Firebase hosting REST API documentation for this one (https://firebase.google.com/docs/hosting/api-deploy#raw-http-request)
Particularly the first part of the code
const {google} = require('googleapis');
console.log("access token: ", getAccessToken());
function getAccessToken() {
return new Promise(function(resolve, reject) {
var key = require('./service-account.json');
var jwtClient = new google.auth.JWT(
key.client_email,
null,
key.private_key,
SCOPES,
null
);
jwtClient.authorize(function(err, tokens) {
if (err) {
reject(err);
return;
}
resolve(tokens.access_token);
});
});
}
But it throws this error and I can't seem to find this online? Am I making a mistake somewhere?
`ReferenceError` was thrown:
ReferenceError: SCOPES is not defined
Thank you!