使用 cURL returns 代码 403 "Access not configured" 创建第一个用户
Creating first user using cURL returns code 403 "Access not configured"
我尝试为我的 Google 云 SQL 服务器实例创建第一个用户。
我使用的 cURL 查询是:
curl -X POST --header "Authorization: Bearer MY TOKEN" --header "Content-Type: application/json" https://www.googleapis.com/sql/v1beta4/projects/MY PROJECT/instances/MY INSTANCE/users --data "{'host': '%', 'name': 'MY USERNAME', 'password': 'MY PASSWORD'}"
已为我的项目激活 Google Cloud SQL API。
作为响应消息,我得到:
"message": "Access Not Configured. Cloud SQL Administration API has not been used \in project 407408718192 before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/sqladmin/overview?project=4074087XXXXX then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry."
我取回的项目ID甚至不是我自己的。
这是一个错误还是我做错了什么?
如果您需要更多信息,请告诉我。
如 Juan Enrique Muñoz Zolotoochin 的评论所示,我需要在 oAuth 游乐场(右上角,齿轮)中使用我自己的凭据
我尝试为我的 Google 云 SQL 服务器实例创建第一个用户。
我使用的 cURL 查询是:
curl -X POST --header "Authorization: Bearer MY TOKEN" --header "Content-Type: application/json" https://www.googleapis.com/sql/v1beta4/projects/MY PROJECT/instances/MY INSTANCE/users --data "{'host': '%', 'name': 'MY USERNAME', 'password': 'MY PASSWORD'}"
已为我的项目激活 Google Cloud SQL API。
作为响应消息,我得到:
"message": "Access Not Configured. Cloud SQL Administration API has not been used \in project 407408718192 before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/sqladmin/overview?project=4074087XXXXX then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry."
我取回的项目ID甚至不是我自己的。
这是一个错误还是我做错了什么? 如果您需要更多信息,请告诉我。
如 Juan Enrique Muñoz Zolotoochin 的评论所示,我需要在 oAuth 游乐场(右上角,齿轮)中使用我自己的凭据