【发布时间】:2021-05-22 20:46:28
【问题描述】:
我正在尝试允许 google 表格与 Podio api 交互。第一步是 Oauth2 身份验证,我正在尝试关注https://developers.podio.com/authentication/app_auth,我有以下初始代码:
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);
}
我能够分别从 https://podio.com/settings/api 和特定的应用程序开发人员选项卡中获取前 4 个参数。
我尝试在标题为“您的返回 URL(例如 mypodioapp.com)的完整域(无协议)”的框中设置重定向 URL(见屏幕截图)
我收到以下错误:
script.google.com/macros/d/1??????????yVDcp7-oMle9/usercallback is not a valid domain
如何设置重定向网址?
【问题讨论】: