使用 Zapier CLI 创建应用程序时如何手动刷新令牌
How do I manually refresh-token while creating apps using Zapier CLI
我想执行刷新令牌,但我的网关提供 HTTP 响应 403 而不是 401,所以我无法使用 Zapier 的 'autoRefresh' 功能。
当响应状态为 403 时,我尝试抛出 'RefreshTokenException',如下所示:
return responsePromise
.then((response) => {
if (response.status == 403) {
throw new RefreshTokenException();
}
...
});
但是在执行此操作时,我从 Zapier 收到错误消息(在创建 zaps 时)指出:
RefreshTokenException is not defined
任何人都可以帮助我使用 Zapier CLI 平台手动刷新令牌以创建应用程序吗?
来自 Zapier 平台团队的 David。抱歉回复慢,我们刚刚看到其中的一些。
它没有定义,因为那不是我们定义的错误。您的想法是正确的,您只需要改用 RefreshAuthError
即可。参见 these docs。
如果您还有其他问题,请告诉我!
我想执行刷新令牌,但我的网关提供 HTTP 响应 403 而不是 401,所以我无法使用 Zapier 的 'autoRefresh' 功能。
当响应状态为 403 时,我尝试抛出 'RefreshTokenException',如下所示:
return responsePromise
.then((response) => {
if (response.status == 403) {
throw new RefreshTokenException();
}
...
});
但是在执行此操作时,我从 Zapier 收到错误消息(在创建 zaps 时)指出:
RefreshTokenException is not defined
任何人都可以帮助我使用 Zapier CLI 平台手动刷新令牌以创建应用程序吗?
来自 Zapier 平台团队的 David。抱歉回复慢,我们刚刚看到其中的一些。
它没有定义,因为那不是我们定义的错误。您的想法是正确的,您只需要改用 RefreshAuthError
即可。参见 these docs。
如果您还有其他问题,请告诉我!