403错误消息:访问未配置。请使用Google Developers Console激活项目的API [英] 403 error with message:Access Not Configured. Please use Google Developers Console to activate the API for your project

查看:290
本文介绍了403错误消息:访问未配置。请使用Google Developers Console激活项目的API的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

无法克服这种情况:
在Google开发人员控制台
中创建了一个项目,他们创建了Web应用程序的客户端ID和服务器应用程序的密钥。



在控制台请求已成功完成,但是当我从服务器发送时,我收到以下错误:

  403:{
error:{
errors:[
{
domain:usageLimits,
reason accessNotConfigured,
message:Access未配置,请使用Google Developers Console激活项目的API。
}
],
code:403,
message:Access未配置,请使用Google Developers Console激活您的项目的API。
}
}

构造查询的参数checked ..
请求继续:

 https://www.googleapis.com/calendar/v3/freeBusy?key=my_key 
pass parameters:{items:[{id:calendar_id@group.calendar.google.com}],timeMax:2014-04-09T00:00:00 + 01 :00,timeMin:2014-01-09T00:00:00 + 01:00,timeZone:Europe \ / Berlin}
pre>

在哪里可以看到错误是什么?



是否在此帮助帐单(目前关闭开票未启用)?



下一个选项卡API& auth->凭证我添加到项目Web应用程序的客户端ID,
当您创建立即指出创建时重定向URI自动生成可与任何主机配合使用的浏览器应用程序键)。
这些步骤之后,我指向一个创建设置和请求的网站。



发送请求使用drupal和modules:gauth和gcal(使用< a href =http://code.google.com/p/google-api-php-client/ =noreferrer> http://code.google.com/p/google-api-php-client / )。

解决方案

我得到完全相同的错误(Google Glass Mirror API除外)。添加结算信息并将http / https添加到我的重定向网址中也没有帮助。



显然,当您提供OAuth2凭据和API密钥解决方案(如果您正在使用PHP API的Google API客户端库),只需从代码中删除以下内容:

  $客户端 - > setDeveloperKey($键); 

希望这有帮助。


Can't overcome this situation: created a project in the Google developers console they created "Client ID for web application" and "Key for server applications".

In the console requests have completed successfully, but when I send from the server I get the following error:

403: {
 "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."
 }
}

Parameters to construct the query checked.. the request goes on:

"https://www.googleapis.com/calendar/v3/freeBusy?key=my_key"
pass parameters: "{"items":[{"id":"calendar_id@group.calendar.google.com"}],"timeMax":"2014-04-09T00:00:00+01:00","timeMin":"2014-01-09T00:00:00+01:00","timeZone":"Europe\/Berlin"}"

Where can I see what the error is?

Whether in this help Billing (at the moment it is turned off "Billing is not enabled")?

========================== UPDATED: The problem was resolved so (like shamanism): I just created a new project in the google api, next tab "APIs&auth->Credentials" I added to the project "Client ID for web application", when you create immediately pointed out "Redirect URIs" when you create is automatically generated "Key for browser applications"that can work with any host). After these steps, I point to a website created settings and requests are.

To send requests to use drupal and modules: gauth and gcal (which uses http://code.google.com/p/google-api-php-client/).

解决方案

I was getting the exact same error (except with the Google Glass Mirror API). Adding billing information and adding both http/https to my redirect URL didn't help either.

Apparently Google APIs have been known to misbehave when you provide both OAuth2 credentials and an API Key! The solution (if you are using the Google APIs Client Library for PHP) is to simply remove the following from your code:

$client->setDeveloperKey($key);

Hope this helps.

这篇关于403错误消息:访问未配置。请使用Google Developers Console激活项目的API的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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