【问题标题】:"Unable to authenticate the request" with new Geocoding service with optional parameter "new_forward_geocoder"带有可选参数“new_forward_geocoder”的新地理编码服务“无法验证请求”
【发布时间】:2017-04-22 01:16:02
【问题描述】:

我们可以通过在 Geocoding API 请求中添加可选参数 new_forward_geocoder=true 来在启动前试用新的 Geocoding 服务。

当我尝试使用带有 url https://maps.googleapis.com/maps/api/geocode/xml?new_forward_geocoder=true&address=1600+Amphitheatre+Parkway,+Mountain+View,+CA&key=API_KEY 的可选参数 new_forward_geocoder 时,我得到了结果

但是当我尝试使用 url https://maps.googleapis.com/maps/api/geocode/xml?new_forward_geocoder=true&address=1600+Amphitheatre+Parkway,+Mountain+View,+CA&client=CLIENT&signature=SIGNATURE&channel=CHANNEL 然后我收到错误 -

无法验证请求。提供的“签名”对于提供的客户 ID 无效,或者提供的“客户”无效。 已根据 URL 检查签名:/maps/api/geocode/xml?new_forward_geocoder=true&address=1600+Amphitheatre+Parkway,+Mountain+View,+CA&client=CLIENT 如果这与您请求的 URL 不匹配,请确保您的请求的 URL 编码正确。了解更多:https://developers.google.com/maps/documentation/business/webservices/auth

【问题讨论】:

  • 签名计算前必须在URL中添加参数。
  • 我发现了我的错误。我无法将任何参数附加到现有请求。添加新参数后,我必须再次计算签名。

标签: geocoding google-geocoding-api


【解决方案1】:

我发现了我的错误。我无法将任何参数附加到现有请求。添加新参数后我必须再次计算签名

我必须在签名计算之前在 URL 中添加参数。

【讨论】:

    猜你喜欢
    • 2022-01-10
    • 1970-01-01
    • 2016-07-26
    • 2015-09-15
    • 1970-01-01
    • 1970-01-01
    • 2023-04-05
    • 1970-01-01
    • 2017-03-10
    相关资源
    最近更新 更多