加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 编程开发 > Python > 正文

python – Google Cloud – oauth2client.client.HttpAccess

发布时间:2020-12-16 22:52:21 所属栏目:Python 来源:网络整理
导读:我在尝试执行Google Prediction API时收到此错误消息. raise HttpAccessTokenRefreshError(error_msg,status=resp.status)oauth2client.client.HttpAccessTokenRefreshError: invalid_grant 我的凭证详情 { "scopes": [],"private_key": "XXXXX","id_token":

我在尝试执行Google Prediction API时收到此错误消息.

raise HttpAccessTokenRefreshError(error_msg,status=resp.status)
oauth2client.client.HttpAccessTokenRefreshError: invalid_grant

我的凭证详情

{
    "scopes": [],"private_key": "XXXXX","id_token": null,"token_uri": "https://accounts.google.com/o/oauth2/token","token_info_uri": null,"token_response": null,"client_id": null,"scope": "https://www.googleapis.com/auth/prediction https://www.googleapis.com/auth/devstorage.read_only","token_expiry": null,"_class": "SignedJwtAssertionCredentials","refresh_token": null,"_module": "oauth2client.client","private_key_password": "notasecret","access_token": null,"service_account_name": "account-1@myapp-1136.iam.gserviceaccount.com","invalid": false,"assertion_type": null,"kwargs": {},"client_secret": null,"revoke_uri": "https://accounts.google.com/o/oauth2/revoke","user_agent": null
}
最佳答案
对于此问题的未来读者,如果此问题在本地发生,则可能是由于系统时钟不同步造成的.否则,在发布此问题的同时,这也是App Engine上的已知问题.两个原因的详细信息可以在去年oauth2client GitHub项目页面的问题报告中找到:

oauth2client.client.HttpAccessTokenRefreshError: invalid_grant: Bad Request

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读