問題描述
無法克服這種情況:在 Google 開發者控制臺中創建了一個項目他們創建了Web 應用程序的客戶端 ID"和服務器應用程序的密鑰".
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?
是否在此幫助 Billing(目前已關閉Billing is not enabled")?
Whether in this help Billing (at the moment it is turned off "Billing is not enabled")?
==========================更新:問題是這樣解決的(如薩滿教):我剛剛在google api中創建了一個新項目,下一個選項卡APIs&auth->Credentials"我添加到項目Web 應用程序的客戶端 ID"中,當您創建時立即指出重定向 URI",當您創建時會自動生成瀏覽器應用程序的密鑰",可以與任何主機一起使用).完成這些步驟后,我指向一個網站創建的設置和請求.
========================== 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.
發送使用 drupal 和模塊的請求:gauth 和 gcal(使用 http://code.google.com/p/google-api-php-client/).
To send requests to use drupal and modules: gauth and gcal (which uses http://code.google.com/p/google-api-php-client/).
推薦答案
我遇到了完全相同的錯誤(除了 Google Glass Mirror API).添加帳單信息并將 http/https 添加到我的重定向 URL 也無濟于事.
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.
當您同時提供 OAuth2 憑據和 API 密鑰時,顯然 Google API 會出現行為不端!解決方案(如果您使用的是適用于 PHP 的 Google API 客戶端庫)是簡單地從您的代碼中刪除以下內容:
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);
希望這會有所幫助.
這篇關于403 錯誤消息:未配置訪問.請使用 Google Developers Console 為您的項目激活 API的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!