Google AnalyticsAPI:什么是'YOUR_OAUTH_ACCESS_TOKEN'?

时间:2012-04-06 18:18:34

标签: google-analytics-api

是的,它是什么以及它去了哪里?我看到的例子如下:

    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密码?

2 个答案:

答案 0 :(得分:0)

有关将OAuth与Google服务结合使用的详情,请查看here

更新:this文章提供了调用GA API的分步说明。

答案 1 :(得分:0)

如果您想要获取code,则必须与access token 交换refresh token

然后使用access tokenrefresh token调用所选的Google 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