Ios 谷歌云存储JSON上传器api显示错误
我正在使用GoogleCloudUploader()API从IOS上传图像 我有下面的代码。对于REST Manager,我使用的代码来自这里 我从谷歌云存储api收到以下错误消息。我已经按照所有说明在谷歌开发者控制台中配置应用程序Ios 谷歌云存储JSON上传器api显示错误,ios,google-cloud-storage,Ios,Google Cloud Storage,我正在使用GoogleCloudUploader()API从IOS上传图像 我有下面的代码。对于REST Manager,我使用的代码来自这里 我从谷歌云存储api收到以下错误消息。我已经按照所有说明在谷歌开发者控制台中配置应用程序 { "error": { "errors": [ { "domain": "usageLimits", "reason": "accessNotConfigured", "message": "Access Not Configu
{
"error": {
"errors": [
{
"domain": "usageLimits",
"reason": "accessNotConfigured",
"message": "Access Not Configured. Please use Google Developers Console to activate the API for your project."
}
],
"code": 403,
"message": "Access Not Configured. Please use Google Developers Console to activate the API for your project."
}
有人能帮我吗 我假设您使用的是iOS密钥。对于这个特定的用例,这实际上是不正确的。我知道在iOS应用程序中使用iOS密钥显然是正确的,但奇怪的是事实并非如此
这里有一个很好的答案解释了该怎么做:几个快速问题。首先,您如何进行身份验证?其次,在控制台上,在API&auth=>API下,“googlecloudstoragejsonapi”设置为开还是关?我使用的是API键,oauth2.0两者都使用。这就是为什么你用它得到正确的回答?我不知道它看起来是全有线的!啊,对不起,我搞糊涂了。我已经修改了我的答案。好吧,如果我使用浏览器键和HTTP引用框为空,那么我就能够从谷歌云服务器获得正确的响应。这是我的正确理解吗?您是否仍然看到“未配置访问”错误,或者您是否看到“需要登录”错误?API密钥不会以任何方式授权您的请求,因此我希望这些调用会失败,除非您已授予bucket的匿名写入权限。这只是一种为配额目的标记请求的方法。但在文档中提到,我们可以使用API密钥或授权头。所以API密钥在这种情况下不起作用。授权头我也没试过!它总是显示身份验证错误。我尝试了OAuth2.0,范围是正确的
{
"error": {
"errors": [
{
"domain": "usageLimits",
"reason": "accessNotConfigured",
"message": "Access Not Configured. Please use Google Developers Console to activate the API for your project."
}
],
"code": 403,
"message": "Access Not Configured. Please use Google Developers Console to activate the API for your project."
}