Am正在尝试使用client.js进行trello身份验证。无论我使用什么url,我都会得到无效的return_url

问题描述 投票:0回答:1

要获得与我的Web应用程序进行trello集成的令牌,请使用client.js。但是当我打电话给Trello.authorize(opts);无论传入的URL是什么,它都将返回“ invaid return_url”。如果我只是简单地调用trello的网址,则需要我批准其中有令牌的页面,但我想在脚本中捕获并存储它。请帮助。

已尝试通过直接调用/ authorize url并通过使用client.js中的Trello.authorize方法来尝试

var opts = {
    'type'          :   'popup',
    'name'          :   'My App',
    'persist'       :   true,
    'interactive'   :   true,
    'scope'         :   { read: true, write: true, account: true },
    'expiration'    :   'never',
    'success'       :   function() {
                            //console.log("this.Authenticate success");
                        },
    'error'         :   function () {
                            //console.log("this.Authenticate failed");

                        },
    return_url: "https://{HOST_NAME}/trello1.do",
};Trello.authorize(opts);
javascript trello
1个回答
© www.soinside.com 2019 - 2024. All rights reserved.