JeremiahRo
JeremiahRo

Reputation: 15

Google Cloud service account auth without full json file

I'm trying to programmatically (python) authenticate with Google Cloud when I'm only passed the client_email and private_key from the service account json file. Every library and code example I've found expects that you have the full json file. I know it's possible because I've used an application that supports it, I just don't know how it might be done in python.

Upvotes: 0

Views: 928

Answers (1)

John Hanley
John Hanley

Reputation: 81386

I wrote an article on how to create OAuth tokens from a service account JSON file. Includes real working code. You could take my code and then experiment by removing various items until Google refuses to issue an Access Token.

Google Cloud – Creating OAuth Access Tokens for REST API Calls

Upvotes: 2

Related Questions