android - 谷歌 urlshortener api 上的谷歌 API key 失败

我在通过 ApiKey 使用 Google urlshortener api 时收到此错误消息: (我使用相同的 API key 在同一个应用程序中显示谷歌地图没有任何问题) 我哪里做错了?

com.google.api.client.googleapis.json.GoogleJsonResponseException: 403 Forbidden "code": 403, "errors": [ { "domain": "usageLimits", "message": "The Android package name and signing-certificate fingerprint, null and null, do not match the app restrictions configured on your API key. Please use the API Console to update your key restrictions.", "reason": "ipRefererBlocked", "extendedHelp": "https://console.developers.google.com/apis/credentials?project=xxxx" } ],> "message": "The Android package name and signing-certificate fingerprint, null and null, do not match the app restrictions configured on your API key. Please use the API Console to update your key restrictions."*

最佳答案

您必须使用浏览器键,而不是 android 键。

关于android - 谷歌 urlshortener api 上的谷歌 API key 失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36952585/

相关文章:

php - 如何用 PHP 中的 goo.gl 等短 URL 识别域名?

url - 谷歌短网址如何运作?

objective-c - 在 Cocoa 中获取缩短 URL 的长 URL 的最简单方法?

apache - 无法让 mod_rewrite 正确(且不可见地)重写我的 URL?

json - 格式化url生成goo.gl短url

javascript - 使用 JSON 使用 Javascript 缩短 URL

php - PHP 和 MySQL 中的短 URL 出站链接跟踪

url - 是否有用于将短网址翻译回常规链接的 API?

apache - mod_rewrite 制作短网址

regex - 解析短网址的正则表达式