android - Google API key 在 google urlshortener api 上失败

标签 android google-api short-url

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

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 - Google API key 在 google urlshortener api 上失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36952585/

相关文章:

java - Android:Facebook API 4.6,我可以回调管理器单例吗?

rest - 通过 REST 调用读取用户的 Google Fit 事件

url - 短网址如何运作?

php - 无法让 PHP 代码工作

Android JobScheduler setRequiresDeviceIdle

java - 计算屏幕中的最大平方

google-api - 为什么 Google OAuth 客户端出现在开发中

javascript - 嵌入谷歌驱动器选择器作为页面的一部分

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

java - 将全局静态变量声明为 null 是一个好习惯吗?