【发布时间】:2018-06-11 21:19:11
【问题描述】:
我正在使用Google's php api client。我正在为服务帐户运行quickstart guide。我完美地遵循了这些步骤(据我所知)。我遇到了以下错误:
{
"error": "invalid_grant",
"error_description": "Invalid JWT: Token must be a short-lived token (60 minutes) and in a reasonable timeframe. Check your iat and exp values and use a clock with skew to account for clock differences between systems."
}
根据我的阅读,此错误最常见的问题是系统时间是否错误。我已经三次检查了我的时区、日期和时间是否与原子钟同步。我使用 php set timezone 函数来设置我的时区以匹配我的计算机,但我继续收到错误。我正在查看邮件中提到 iat 和 exp 设置的另一部分,但还没有得到任何结果。
有没有人知道我该如何克服这个问题?
【问题讨论】:
-
如果在 Windows WSL 上,请通过 ntpdate 更新您的时间:askubuntu.com/questions/81293/…
标签: php google-api google-api-php-client