Reputation: 36267
I'm trying to allow google sheets to interact with the Podio api. The first step is Oauth2 auth and I'm trying to follow https://developers.podio.com/authentication/app_auth on which I have the following initial code:
function podio1() {
const CLIENTID = '????'
const CLIENTSECRET = 'lP???'
const APPID = '????'
const APPTOKEN = '????'
const MYURL = 'script.google.com/macros/d/?????n_5ULh_JGhMwZNapyVDcp7-oMle9/usercallback'
var options =
{
"method" : "post"
};
var result = UrlFetchApp.fetch("https://podio.com/oauth/token?grant_type=app&app_id=APPID&app_token=APPTOKEN&client_id=CLIENTID&redirect_uri=MYURL&client_secret=CLIENTSECRET",options);
Logger.log(result.getContentText());
var json = result.getContentText();
var data = JSON.parse(json);
}
I was able to get the first 4 parameters from https://podio.com/settings/api and the specific apps developer tab respectively.
I tried to set the redirect url in the box titled: 'Full domain (without protocol) of your return URL (e.g. mypodioapp.com)' (see screenshot)
I'm getting the following error:
script.google.com/macros/d/1??????????yVDcp7-oMle9/usercallback is not a valid domain
How do I set the redirect url?
Upvotes: 0
Views: 303
Reputation: 446
"Full domain (without protocol) of your return URL (e.g. mypodioapp.com)" is looking for only the domain - not the whole redirect link.
In your case, it would simply be script.google.com
Upvotes: 1