Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to programmatically create Google service account credentials?

I have a desktop application which I want to create a new service account for each user of my application.

Is there any API for creating the service account users on the fly?

Scenario: For each user, I want to give service account, and give this service account the data that this user needs.

The point is that I want to give every user some specific data from Google Cloud, but I want the user to get it directly from Google. I cannot use the user account, because I am not sure he have google account.

like image 667
Aminadav Glickshtein Avatar asked Oct 26 '25 05:10

Aminadav Glickshtein


2 Answers

You can use the Google Identity and Access Management (IAM) API to programatically create service accounts.

However, creating a service account for each of your application's users is expensive and not scalable. Perhaps your service can have a single service account and then the service can control which of the resources that the user may access.

like image 190
Patrick Avatar answered Oct 29 '25 04:10

Patrick


There is no Google Api that allows you to control projects on Google Developer console. The only thing that comes close is the Google Cloud Resource Manager API which is extremely limited in what it supports. You cant use it to create a service account.

Answer: The only way to create a new service account is to log in and do it though the Google Developers console.

like image 42
DaImTo Avatar answered Oct 29 '25 05:10

DaImTo



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!