为来自 appengine 的 freebase 查询设置 api 密钥 [英] Setup api key for freebase queries from appengine

查看:40
本文介绍了为来自 appengine 的 freebase 查询设置 api 密钥的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已按照以下说明操作:https://developers.google.com/console/help/#generatingdevkeys/.我注册了 freebase 服务并将浏览器应用程序的简单 API 密钥添加到查询中:https://api.freebase.com/api/service/mqlread?key=keygoeshere&query={MQLquery}

I have followed these instructions: https://developers.google.com/console/help/#generatingdevkeys/. I registered the freebase service and added the Simple API key for browser apps to the query: https://api.freebase.com/api/service/mqlread?key=keygoeshere&query={MQLquery}

然后我收到以下错误:

 {u'code': 100, u'message': u'Invalid API Key (Key not found)', u'stat': u'fail'}

如果我从查询中删除密钥,它在本地工作但远程我得到:freebase api 在部署到 appengine 时出错:DownloadError: ApplicationError: 2.我认为这是由于 freebase 阻止了 appengine,因为密钥未注册或识别

If I remove the key from the query it works locally but remotely I get: freebase api error on deployment to appengine: DownloadError: ApplicationError: 2. Which I believe is due to freebase blocking the appengine because the key is not registered or recognised

推荐答案

文档说旧的 http://api.freebase.com API 已被弃用(第一段).

The docs say that the old http://api.freebase.com API has been deprecated (first paragraph).

您应该通过 google url 访问 Freebase:https://www.googleapis.com/freebase/v1/search?q=bob&key=<YOUR_API_KEY>

You should access Freebase through google url: https://www.googleapis.com/freebase/v1/search?q=bob&key=<YOUR_API_KEY>

这篇关于为来自 appengine 的 freebase 查询设置 api 密钥的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆