问题描述
我们的开发人员要求我为他们提供Baidu地图的API键,以便他们可以在网站上设置我们的现场商店定位器,我不确定该如何执行此操作.
我试图在百度上设置一个帐户,但它要求提供中国手机号码.在获得钥匙之前,我必须得到其中之一吗?一旦我有一个帐户,可以弄清楚如何获得钥匙有多容易?
任何人都可以为设置此设置的最佳方法提供建议吗?
预先感谢!
推荐答案
更新2016:现在似乎可以使用非中国电话号码来创建百度帐户,请参见此页面.
登录Baidu后,您需要找到其LBS(基于位置的服务)云,然后转到那里的控制中心:
http://lbsyun.baidu.com/apiconsole/key/key
在那里您单击"创建新应用/键"创建(0/20)(橙色按钮).在弹出窗口中,您可以给它一个名称,然后在您的情况下可能选择"服务器".以下复选框列表是您要为密钥阻止的内容.如果您想访问所有内容,那就什么都没有勾选(花了我一段时间来弄清楚这一点,我总是给一切打勾...
)对于服务器键,您可以为用户选择基于IP的白名单,您将在那里输入服务器的地址.我不确定其他(SN)选项.
单击确认新键时应显示在表中,请复制并使用它.
其他推荐答案
这比Peedee的答案更容易:
- 如果您无法阅读中文,请安装 in Chrome(translate.google.com无法翻译https页面).在每个新页面上,您必须单击工具栏中的扩展名,然后选择"翻译此页面".
- 在 http://passport.baidu.com 上创建一个帐户.您需要有效的电子邮件地址和一个密码.
- 在 http://developer.baidu.com/user/rege.com/user/regeg/a >.您需要通过输入通过SMS发送的代码来验证手机号码. Google的声音为此而努力.我们数字的格式为"(1)760-123-4567".您只有60秒即可输入6位代码.
- 转到 http://lbsyun.baidu.com/apiconsole/key/key/key .
- 单击"我同意"按钮.
- 选择"浏览器"作为应用程序类型.
- enter *在Refer the Refer Whitelist中(除非您只想允许某些域使用API)
就是这样.您将获得"访问应用程序(AK)"键.
问题描述
I have been asked by our developers to give them an API key for Baidu maps so they can set up our on site store locator and I'm not really sure how to go about doing this.
I tried to set up an account on Baidu but it asked for a chinese mobile number. Do I have to get one of these before I can get the key? And how easy is it to work out how to obtain the key once i've got an account?
Can anyone advise on the best way to set this up?
Thanks in advance!
推荐答案
Update 2016: It now appears to be possible to use non-Chinese phone numbers to create Baidu accounts, see this page.
Once you're logged into Baidu you need to find their LBS (location-based services) cloud and go to the control center there:
http://lbsyun.baidu.com/apiconsole/key
There you click "Create a new app/key" 创建应用(0/20) (orange button). In the popup you give it a name and then in your case probably select "for server". The following list of checkboxes is for the things you want to BLOCK for your key. If you want access to everything then tick NOTHING (took me a while to figure that out, I always ticked everything...)
For server keys you can select an IP based whitelist for users, you would enter the addresses of your servers there. I'm not sure about the other (sn) option.
When you click Confirm the new key should appear in the table, copy & use it.
其他推荐答案
Here's an easier answer than peedee's:
- If you can't read Chinese, install the Google Translate extension in Chrome (translate.google.com can't translate HTTPS pages). On each new page, you'll have to click the extension in the toolbar and choose "TRANSLATE THIS PAGE".
- Create an account at http://passport.baidu.com. You'll need a valid email address and a password.
- Set up a developer account at http://developer.baidu.com/user/reg. You'll need to verify a mobile phone number by typing in a code sent via SMS. A Google Voice worked for that. The format for US numbers is "(1)760-123-4567". You only have 60 seconds to enter the 6-digit code.
- Go to http://lbsyun.baidu.com/apiconsole/key.
- Click the "I agree" button.
- Choose "Browser" as the application type.
- Enter * in the Refer whitelist (unless you want to only allow certain domains to use the API)
That's it. You'll get an "Access application (AK)" key.