Skip to content

Instantly share code, notes, and snippets.

@richieforeman
Last active January 8, 2016 16:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save richieforeman/4fe219de43df5cd564d8 to your computer and use it in GitHub Desktop.
Save richieforeman/4fe219de43df5cd564d8 to your computer and use it in GitHub Desktop.
Google API Tracing Token - PHP
$service = new Google_Service_Directory($googleClient);
// A tracing token can be utilizing with the PHP 1.0 library by passing an associative array to
// the '$optParams' value of the method call. The order of this parameter varies for each method call,
// but is typically immediately after the required arguments.
//
// The tracing token parameter will need to be added to EACH AND EVERY call where a tracing token is required.
$makeAdmin = new Google_Service_Directory_UserMakeAdmin();
$makeAdmin->setStatus(true);
$service->users->makeAdmin('marty.mcfly@timecircuit.org', $makeAdmin, array(
'trace' => 'token:<<token goes here>>'
));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment