0

I'm building an application that needs to authenticate users using Authsub. I have the authsub token already stored as $sessiontoken

I want to use this with the Google Analytics PHP interface (GAPI) but it only provides support for hard coded username and password:

`define('ga_email','removed@gmail.com');

define('ga_password','removed');

define('ga_profile_id','removed');

require 'gapi.class.php';

$ga = new gapi(ga_email,ga_password);`

How can I use my authsub token here instead?

Yahel
  • 37,023
  • 22
  • 103
  • 153
hud
  • 203
  • 1
  • 5
  • 13

1 Answers1

1

The token can be passed as an optional parameter on the end of the constructor. Just use null for the username and password then your auth token:

$ga = new gapi(null, null, $authToken);
Ewan Heming
  • 4,628
  • 2
  • 21
  • 20