I'm trying to be OAuth2-authorized by using the gapi library from inside an HtmlService project. I've got my CLIENT_ID from the console and I've set up the "Authorized Javascript Origins" with all of what I could think about like "https://script.google.com", "https://script.googleusercontent.com", etc, but I always end with an "origin mismatch" error.
This is the code I'm using from inside the html javascript code.
function checkAuth() {
gapi.auth.authorize({
'client_id': CLIENT_ID,
'scope': SCOPES,
'immediate': false
}, handleAuthResult);
}
What am I doing wrong?
Thanks
