距离矩阵API返回错误消息

时间:2020-01-14 15:08:30

标签: google-maps

我被授予GCP项目的项目编辑者角色,在https://console.cloud.google.com/billing/projects中可以看到该项目已映射到一个计费帐户,因此它显示了计费帐户ID。

我尝试测试GCP实例的启动,以查看其是否正常运行。距离矩阵API已启用,API密钥已生成并测试了距离矩阵API,但是我收到以下错误消息。

{
   "destination_addresses": [],
   "error_message": "You must enable Billing on the Google Cloud Project at https://console.cloud.google.com/project/_/billing/enable Learn more at https://developers.google.com/maps/gmp-get-started",
   "origin_addresses": [],
   "rows": [],
   "status": "REQUEST_DENIED"
}

为什么会出现此错误?如果未启用计费功能,则无法启动VM实例。

1 个答案:

答案 0 :(得分:0)

谢谢!通过在创建帐单帐户时选择Google Maps Platform而不是Google Cloud Platform,为Google地图创建新的帐单帐户已解决了该问题,然后将该帐单帐户与新创建的项目相关联。该新项目生成的API密钥有效。与常规Google Cloud Platform计费帐户不同,使用Google Maps需要创建单独的计费帐户