Category : google-api

I’m coding a php mailbox for Gmail but when I try to get labels, I get this error : { "error":{ "code":403, "message":"Request had insufficient authentication scopes.", "errors":[{ "message":"Insufficient Permission", "domain":"global", "reason":"insufficientPermissions" }], "status":"PERMISSION_DENIED" }} Here is my code : $labelsURL = "https://gmail.googleapis.com/gmail/v1/users/" . $id . "/labels"; $curlLabels = curl_init($labelsURL); curl_setopt($curlLabels, CURLOPT_RETURNTRANSFER, true); curl_setopt($curlLabels, CURLOPT_HTTPHEADER, ..

Read more

I’d like to create a small dashboard containing some analytics data from my mobile application. I found the new Google Analytics Data API which would be perfect for that. I want to run reports in my backend PHP application, so I’m using the PHP client library: https://github.com/GoogleCloudPlatform/php-docs-samples/tree/master/analyticsdata Unfortunately I keep running against a 400 error ..

Read more

I’m using this example from Docs <LINK> the only thing i changed was the read scope only for a scope that is allowed to create a user to list $optParams = array( ‘customer’ => ‘my_customer’, ‘maxResults’ => 10, ‘orderBy’ => ’email’, ); $results = $service->users->listUsers($optParams); if (count($results->getUsers()) == 0) { print "No users found.n"; } ..

Read more