我怎么能做出谷歌Places API的API KEY? [英] how can I make API KEY for Google Places api?

查看:214
本文介绍了我怎么能做出谷歌Places API的API KEY?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在这里,我有我无法访问谷歌的一个问题Places API的服务机器人,找出附近的地方。

Here I have one problem that I can't access google places api service in android to find out nearby places.

我看了很多教程,但没有明确提及如何使一个浏览器键或Android键?

i have read many tutorials but none of that clearly mention how to make a browser key or android key?

在这里,我已经尝试了所有这些。

here i have tried all these.

1)做一个浏览器键,并通过此查询
 <一href=\"https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=-33.8670522,151.1957362&radius=500&types=food&name=harbour&sensor=false&key=YourAPIKey\" rel=\"nofollow\">https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=-33.8670522,151.1957362&radius=500&types=food&name=harbour&sensor=false&key=YourAPIKey

1) make a browser key and pass in this query https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=-33.8670522,151.1957362&radius=500&types=food&name=harbour&sensor=false&key=YourAPIKey

2)制作的机器人钥匙,并通过该密钥在相同的查询,但结果总是相同的,显示的错误为拒绝访问

2) made an android key and pass that key in same query but result is always same and show error as "access denied"

谁能回答我,我怎么能做出这样的API密钥和其中一个(浏览器键或Android键)?

can anyone answer me how can I make this api key and which one(browser key or android key)?

推荐答案

我一直有这个相同的问题,我也跟着多的导游,但没有帮助。我也结束了,虽然找到正确的解决方案,我能得到我的应用程序的工作。我问计算器通过这里的问题是:<一href=\"http://stackoverflow.com/questions/24302920/how-do-i-get-a-google-places-api-key-for-my-android-app\">How我会得到一个谷歌Places API的钥匙我的Andr​​oid应用

I have been having this exact same problem and I too followed the guides of many, but none helped. I did end up finding a correct solution though and I was able to get my app working. I asked the question via stackoverflow here: How do I get a Google Places API key for my Android App

和得到的回答(中的礼貌user1632209 ,再次谢谢大家!)是:

And the answer received (Courtesy of user1632209, Thank you again!) was:

请按照以下步骤

- 参观谷歌API的控制台在的https://$c$c.google.com /的API /控制台,并请使用您的谷歌帐户。

-Visit the Google APIs Console at https://code.google.com/apis/console and log in with your Google account.

-A默认的项目称为API项目会为您创建当您首次登录API控制台。您可以使用该项目,或通过单击API项目按钮在窗口的顶部,选择创建创建一个新的。商业客户的Maps API必须使用为其创建的API项目作为企业购买他们的地方的一部分。

-A default project called API Project is created for you when you first log in to the APIs Console. You can use the project, or create a new one by clicking the API Project button at the top of the window and selecting Create. Maps API for Business customers must use the API project created for them as part of their Places for Business purchase.

在 - 单击左侧导航面板中的服务链接。

-Click the Services link in the left-hand navigation panel.

-Click状态开关(开/关按钮)旁边的地方API入口。该切换幻灯片到ON。

-Click the status switch (the on/off button) next to the Places API entry. The switch slides to ON.

在左侧导航面板-Click API访问。

-Click API Access in the left-hand navigation panel.

- 单击创建新服务器密钥。如果你希望限制可以发送API请求服务器输入一个或多个服务器的IP地址。

-Click Create new Server key. Enter one or more server IP addresses if you wish to restrict the servers that can send API requests.

- 点击创建。您的API密钥显示在标题密钥服务器应用程序(使用IP锁定)之下。

-Click Create. Your API key appears under the heading Key for server apps (with IP locking).

这篇关于我怎么能做出谷歌Places API的API KEY?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆