Data Studio Community Connector 始终需要授权

Authorisation is constantly required for Data Studio Community Connector

我已经构建了一个连接到 DoubleClickManager API 的社区连接器,以获取报告链接供我稍后获取。它有效!但是,它 (DBM API) 经常需要授权。这是正常行为吗?

我还没有尝试过任何东西,但我可以说在代码中有一个有趣的 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');
};

我没有存储任何用户属性。也许这就是问题所在?

所以显然我没有做错任何事。它只是一个 short-lived 标记(我认为是 1 小时)。解决方法是使用这个项目:link to a project