gpt4 book ai didi

android - 地方的 Google 服务器和 Android API key 之间的区别

转载 作者:行者123 更新时间:2023-11-30 02:49:05 25 4
gpt4 key购买 nike

我正在尝试通过 Android 应用访问 Google Places 服务。

我已经根据需要设置了所有内容。我得到了此处提到的 key Here文档刚刚提到通过 Google 代码转到 API 访问面板并选择 Create new Server key。 但我通过我的 Android 设备使用它,所以我不应该使用 Create new Android key . 它与我在我的设备上为 google maps API 起诉的 key 相同,对吗?

但是当我起诉 key 并发出 API 请求时,我收到了这个错误:

This IP, site or mobile application is not authorized to use this API key.

我做错了什么,如果是,我是否使用了错误的 key ,为什么我不应该为 Android 设备使用 Android key ?如果它必须是服务器 key ,那么在生成服务器 key 时我应该提供什么 IP 地址?请帮忙。

最佳答案

文档清楚的说:

You'll need your own server API key before you can begin using the API

您无法从您的设备访问此 api,您应该从您的服务器访问它并将信息传递给您的用户。

关于android - 地方的 Google 服务器和 Android API key 之间的区别,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24519334/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com