最近我开始使用Google Place API。我为我当前的项目创建了一个服务器密钥。因为我必须使用Place API,所以我在服务页面中打开它。
当我在浏览器中使用以下URL时,我会在浏览器中获得所需的输出。
https://maps.googleapis.com/maps/api/place/textsearch/json?query=restaurants+in+Sydney&sensor=true&key=MY_API_KEY
但是如果我在当前的C ++项目中使用上面的URL或者在ubuntu终端上使用curl命令,我会收到以下错误。
{
"error_message" : "An internal error was found for this API project.",
"html_attributions" : [],
"results" : [],
"status" : "REQUEST_DENIED"
}
我该怎么做才能纠正这种行为?