[英]Authorisation is constantly required for Data Studio Community Connector
I have built a community connector which connects to DoubleClickManager API to grab report links for me to later fetch. 我已经构建了一个社区连接器,该连接器连接到DoubleClickManager API以获取报告链接,供我稍后获取。 And it works!
它的工作原理! However, it (DBM API) constantly requires authorisation.
但是,它(DBM API)经常需要授权。 Is this a normal behaviour?
这是正常行为吗?
I have not tried anything yet but I may say that in the code there is this interesting setPropertyStore() function which I think I am not using correctly. 我还没有尝试任何东西,但我可以说在代码中有这个有趣的setPropertyStore()函数,我认为我没有正确使用。
function getOAuthService() {
return OAuth2.createService('exampleService')
.setAuthorizationBaseUrl('https://accounts.google.com/o/oauth2/auth')
.setTokenUrl('https://accounts.google.com/o/oauth2/token')
.setClientId('my_id')
.setClientSecret('my_secret')
.setPropertyStore(PropertiesService.getUserProperties())
.setCallbackFunction('authCallback')
.setScope('https://www.googleapis.com/auth/doubleclickbidmanager');
};
I do not have any User Properties stored. 我没有存储任何用户属性。 Maybe that is the issue?
也许这就是问题?
So apparently I was not doing anything wrong. 显然我没有做错任何事。 It is simply a short-lived token (I think 1 hour).
它只是一个短命的令牌(我认为1小时)。 the workaround would be using this project: link to a project
解决方法是使用此项目: 链接到项目
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.