Closed GoogleCodeExporter closed 8 years ago
You don't have the key "client_secret" in your dictionary. This is needed to
mint tokens.
Original comment by dhermes@google.com
on 10 Jun 2013 at 8:08
How do I generate client-secrets.json in this case? Console API gives the only
option for "service" apps, and generated client-secrets.json contains no
"client_secret" key.
Original comment by partorg....@gmail.com
on 10 Jun 2013 at 8:12
You don't want to load flow_from_clientsecrets for a service account. In fact,
you don't need a flow at all for a service account.
http://google-api-python-client.googlecode.com/hg/docs/epy/oauth2client.client.S
ignedJwtAssertionCredentials-class.html
from oauth2client.client import SignedJwtAssertionCredentials
SERVICE_ACCOUNT_NAME = "<skipped>@developer.gserviceaccount.com"
with open("file_with_keys.p12", "r") as fh:
PRIVATE_KEY = fh.read()
SCOPE = "THE SCOPES YOU WANT"
credentials = SignedJwtAssertionCredentials(
SERVICE_ACCOUNT_NAME, PRIVATE_KEY, SCOPE)
Original comment by dhermes@google.com
on 10 Jun 2013 at 8:22
Original comment by jcgregorio@google.com
on 5 Aug 2013 at 1:49
Original issue reported on code.google.com by
partorg....@gmail.com
on 10 Jun 2013 at 4:40