邮递员中的 Google API 测试

发布于 2025-01-16 22:12:20 字数 722 浏览 3 评论 0原文

我开始使用 API,所以我使用 Google Maps API。 通过邮递员,我试图从文本中找到一个位置,所以我浏览了文档,发现必须使用两个参数:输入和输入类型。

我正在使用提到的两个参数编写这一行,根据文档,这应该足以获得结果。

https://maps.googleapis.com/maps/api/place/findplacefromtext/json?input=Amphitheatre&inputtype=&key=MYKEY

但是我收到此错误,可能有人建议我我做错了什么吗?我还尝试在参数input type中写入选项textquery,就像文档中显示的那样,但仍然出现相同的错误。

{
    "candidates": [],
    "status": "INVALID_REQUEST"
}

我写错了什么或者遗漏了一些细节?

更新

感谢大家的意见,因为有些人在这里评论我的错误是使用 inputtype=我更改为 < code>inputtype=textquery 没有 <> 符号,它正在工作!

I am beginning to use API's so I'm using Google Maps API.
Through postman I'm trying to get find a place from text so I went through the documentation and saw it is obligatory to use two parameters: input and input type.

I am writing this line with the two mentioned parameters, that according to the documentation should be enough to get a result.

https://maps.googleapis.com/maps/api/place/findplacefromtext/json?input=Amphitheatre&inputtype=<string>&key=MYKEY

However I am getting this error, could someone advice me what I am doing wrong? I also tried writing in the parameter input typethe option textquerylike it's shown in the documentation, but still the same error.

{
    "candidates": [],
    "status": "INVALID_REQUEST"
}

I am writing something wrong or missing some detail?

UPDATE

Thank you everyone for your input, as some people commented here my error was to use the inputtype=<string>I changed to inputtype=textquery without the <> symbols and it is working!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文