Google analytics 如何使用http请求获取谷歌分析数据?
如何使用http请求获取谷歌分析数据 我正在使用获取我的ga数据,有一个按钮获取ga链接,我在新窗口中打开生成的链接,它返回一个错误信息Google analytics 如何使用http请求获取谷歌分析数据?,google-analytics,Google Analytics,如何使用http请求获取谷歌分析数据 我正在使用获取我的ga数据,有一个按钮获取ga链接,我在新窗口中打开生成的链接,它返回一个错误信息 {"error":{"errors":[{"domain":"global","reason":"required","message":"Login Required","locationType":"header","location":"Authorization"}],"code":401,"message":"Login Required"}} 我
{"error":{"errors":[{"domain":"global","reason":"required","message":"Login Required","locationType":"header","location":"Authorization"}],"code":401,"message":"Login Required"}}
我怎样才能将令牌和链接一起发送到google togater
您可能需要使用分析报告API
您必须使用OAuth 2.0授权您的请求。请参阅有关如何创建刷新和访问令牌的。然后使用
授权
头传递访问令牌
Authorization: Bearer 1/fFBGRNJru1FQd44AzqT3Zg
或作为查询参数访问\u令牌
:
https://www.googleapis.com/analytics/v3/data/ga?access_token=1/fFBGRNJru1FQd44AzqT3Zg&...