Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Programmatically create Google Cloud account for CDN

Is there a way of creating a Google Cloud account programmatically?

I'm creating an app where I want the user of the app to be able to export the data created in the app to a location like a CDN.  But I want the app to be able to easily create and setup a Google Cloud account under the users identity so the data stored in the CDN is only accessible by the user of the app.

It seems that there is a lot of steps involved to create a Google Cloud account and to create a CDN, so I want to see if this entire process can be programmatically executed by the app for the user.  All they would need to do is enter some data that would identify this account as their own, and the app would carry out the commands to create the Google Cloud account and create the CDN for them.

If this is not possible, then I'll have to think of another solution for this.

Thanks.

0 2 305
2 REPLIES 2

I believe there is no option or feature that you can configure to create a Google Cloud account on behalf of your user. However, you can allow a user to create and manage Google Cloud resources once they already have an account.
Register a user. When a user signs up in your account, you can request their account information which you can use later to grant access to Google Cloud resources.
After the registration, you can implement OAuth 2.0 authentication to securely link your app to the user's account. You can use these links[1][2] as a guidance for these features. Please note that the link[2] is not a google documentation, however I find it useful since it has guidance and screenshots to the steps that they are providing.

Once an account is linked, you can grant them access to your Google Cloud resources, you can use Google Cloud IAM[3] feature and grant them with a specific role and permission in your resources.

[1]https://developers.google.com/identity/protocols/oauth2
[2]https://medium.com/google-cloud/how-to-end-user-oauth-for-gcp-1dce8e8ef1a2
[3]https://cloud.google.com/iam/docs/grant-role-console

Thank you for your reply. I'm trying to make it easier for users to use Google Drive when they don't already have an account. None of the users of the app will be a developer to know how to create an account for access. I'm trying to figure out a way of getting a user a Google Drive api account without them having to figure out how to do it themselves.