got 'invalid_grant' in oauth2 SignedJwtAssertionCredentials

霸气de小男生 提交于 2019-12-03 06:19:45

I fixed it.

SERVICE_ACCOUNT_EMAIL = 'xxxxxx.apps.googleusercontent.com'

the above is client ID not Email, I fixed this and it's working now.

Jiali Chen scarlett

I have the same problem.

To solve the problem, you need to notice the following elements:

  1. Did you use client_secrets.json in your program? If yes, check whether the name is the same as that in your current directory.

  2. The "client_email " or the "SERVICE_ACCOUNT_EMAIL" is not your personal email or the client id. It is "client id's email". You can check that email in https://console.developers.google.com/project/ ==>credentials==>Service account==>email address.

    Basically, if your client id is:<clientid>.apps.googleusercontent.com

    You client email here would be:<clientid>@developer.gserviceaccount.com

In my case the problem was with the .boto file. Try to configure it again with the credentials from the Service account.

For the ones using fallback: gcs_oauth2_boto_plugin.SetFallbackClientIdAndSecret(CLIENT_ID, CLIENT_SECRET)

use for the fallback any "Client ID for native application". This is not necessary as its said in: https://cloud.google.com/storage/docs/gspythonlibrary

but i couldn't find other way, it was throwing errors without it.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!