Is it possible to create google API KEY programmatically?

ⅰ亾dé卋堺 提交于 2019-12-24 09:51:40

问题


I'm trying to automate the process of creating and managing my projects on Google Cloud Platform. I want to create new project and generate API keys for it and use them.

I am unable to find any API to create API KEYS. Is there any solution ?

Thanks


回答1:


From My little experience you can't . You have to use Google API Console




回答2:


You may not be able to create API keys programmatically, but you can create service accounts. Service accounts can do all the things on API keys can, and are much more secure than API keys. And you can create them via API calls!

Here's the API reference for creating service accounts, and for creating service account keys (which have a public/private keypair).

Here's the API reference for creating projects.

You should be able to do whatever you were trying to accomplish with these tools. But for most simple use-cases using the UI is recommended.



来源:https://stackoverflow.com/questions/45425773/is-it-possible-to-create-google-api-key-programmatically

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!