在我的新公司中,我不得不使用Google Analytics Embed API调试错误。 我想出来之后:
在前端,它与一个域正常工作。
对于请求:maps.googleapis.com/maps/api/js/AuthenticationService.Authenticate?1s&callback=xdc._je5rc5&token=XXXXXX我得到了结果:
/**/_xdc_._je5rc5 && _xdc_._je5rc5( [1,null,0] )
第二次请求: maps.googleapis.com/maps/api/js/GeocodeService.Search?4sLondon%20UK&7sUK&9sde-DE&callback=xdc ._ 1aw0g9&安培;标记= XXXXX1
Return the Right Response: /**/_xdc_._1aw0g9 && _xdc_._1aw0g9( {
"results" : [
{/* Short Version */}
],
"status" : "OK"
}
)
但是在同一服务器上使用另一个域的相同请求出错:
请求:maps.googleapis.com/maps/api/js/AuthenticationService.Authenticate?1s&callback=xdc._bllk9e&token=XXXXXX
回应:
/**/_xdc_._bllk9e && _xdc_._bllk9e( [0,15,0] )
第二个请求:maps.googleapis.com/maps/api/js/GeocodeService.Search?4sLondon%20UK&7sUK&9sde-DE&callback=xdc._1aw0g9&token=XXXXX
响应:
/**/_xdc_._1aw0g9 && _xdc_._1aw0g9( {
"error_message" : "Geocoding Service: This service requires an API key. For more information on authentication and Google Maps Javascript API services please see: https://developers.google.com/maps/documentation/javascript/get-api-key",
"results" : [],
"status" : "REQUEST_DENIED"
}
)
也许有人知道我能做些什么?