[英]Authsub authentication with the GAPI code for Google Analytics API
我正在構建一個需要使用Authsub對用戶進行身份驗證的應用程序。 我已經將authsub令牌存儲為$ sessiontoken
我想將其與Google Analytics(分析)PHP接口(GAPI)一起使用,但它僅支持硬編碼的用戶名和密碼:
`define('ga_email','removed@gmail.com');
define('ga_password','removed');
define('ga_profile_id','removed');
需要'gapi.class.php';
$ ga =新的gapi(ga_email,ga_password);`
如何在這里使用我的authsub令牌?
令牌可以作為可選參數傳遞到構造函數的末尾。 只需使用null
作為用戶名和密碼,然后使用您的身份驗證令牌即可:
$ga = new gapi(null, null, $authToken);
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.