Android API键不起作用的谷歌云存储API(但浏览器API键起作用)

Android API键不起作用的谷歌云存储API(但浏览器API键起作用),android,google-cloud-storage,api-key,android-keystore,Android,Google Cloud Storage,Api Key,Android Keystore,我正在尝试从android应用程序访问google云存储中的对象列表。我用来访问谷歌云存储的电话是: 获取{BUCKET\u NAME}/o?key={YOUR\u API\u key} 当我设置一个没有引用的浏览器API键时,我会得到我期望的JSON结果。存储桶中的文件是可公开访问的,我只是尝试读取它们。但是,我想使用Android API密钥,这样就没有人可以访问这些文件。当我使用Android API键时,得到的结果是: { "error":{ "errors":[

我正在尝试从android应用程序访问google云存储中的对象列表。我用来访问谷歌云存储的电话是:

获取{BUCKET\u NAME}/o?key={YOUR\u API\u key}

当我设置一个没有引用的浏览器API键时,我会得到我期望的JSON结果。存储桶中的文件是可公开访问的,我只是尝试读取它们。但是,我想使用Android API密钥,这样就没有人可以访问这些文件。当我使用Android API键时,得到的结果是:

{
   "error":{
      "errors":[
         {
            "domain":"usageLimits",
            "reason":"ipRefererBlocked",
            "message":"There is a per-IP or per-Referer restriction configured on your API key and the request does not match these restrictions. Please use the Google Developers Console to update your API key configuration if request from this IP or referer should be allowed.",
            "extendedHelp":"https://console.developers.google.com"
         }
      ],
      "code":403,
      "message":"There is a per-IP or per-Referer restriction configured on your API key and the request does not match these restrictions. Please use the Google Developers Console to update your API key configuration if request from this IP or referer should be allowed."
   }
}
我已经为调试密钥库和发布构建密钥库设置了具有正确包名和指纹的Android API密钥。我的应用程序在play store上使用的是发布密钥库,因此包名是唯一的,并且密钥库已被多次用于更新应用程序。对于调试版本和发布版本,我都返回了相同的错误

我以前见过有人遇到过这个问题,每个人都告诉他们使用浏览器API密钥,但我更喜欢只通过我的应用程序访问云存储(以保持潜在的低费率)。我是不是忽略了什么?是否有人使用Android api密钥访问云存储api?

可能存在重复的