2012-04-06 79 views
0

是的,它是什麼,它在哪裏去?我看到這樣的例子:Google Analytics API:什麼是'YOUR_OAUTH_ACCESS_TOKEN'?

For example, the following example shows the request and the collection returned in the response: 

GET https://www.googleapis.com/analytics/v3/management/accounts 
Authorization: /* YOUR_OAUTH_ACCESS_TOKEN */ 

http://code.google.com/intl/es-ES/apis/analytics/docs/mgmt/v3/mgmtRest.html

我完全失去了這裏!我應該如何在那裏輸入訪問令牌?還有,這是什麼?我的谷歌API密碼?

回答

0

有關在Google服務中使用OAuth的更多信息,請參閱here

更新:this文章提供調用GA API的分步說明。

+0

謝謝,我讀了,創造了一個關鍵,但現在呢?我仍然不知道如何使用它...現在我更加困惑,因爲我有一把鑰匙,我不知道該怎麼做:( – luqita 2012-04-06 18:35:04

0

您必須爲access token交換code,如果你想獲得它的refresh token

然後你打電話給access tokenrefresh token選擇谷歌API。

請參見以下教程:

Authenticating with OAuth 2.0 for Google API Access with PHP

Google API Requests with OAuth 2.0 Access Token

Google API Offline Access Using OAuth 2.0 Refresh Token

+0

我不能讓任何這些示例工作.. 。這應該是很難嗎?:( – luqita 2012-04-09 15:46:35

+0

@luqita這些例子是一步一步的,幷包含代碼。你究竟在運行這些例子時遇到了什麼問題? – 2012-04-09 19:33:44