简体   繁体   中英

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.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM