M
M
Maxim2015-06-01 13:28:40
Google Analytics
Maxim, 2015-06-01 13:28:40

How to connect key.p12 for Google Analytics via gapi-google-analytics-php-interface.class?

On May 25, Google switched to OAuth2. There is a wonderful class https://github.com/erebusnz/gapi-google-analytics-...
The description describes in detail about the connection with the steps:
1) The project was created,
2) API Analytics allowed,
3) Full access for [email protected] .com,
4) key.p12 generated and loaded in binary mode.
And the result is an error.

Fatal error: Uncaught exception 'Exception' with message 'GAPI: Failed load key file "key.p12". 
Check if correct p12 format.' in YYY.php:603 
Stack trace: 
#0 YYY.php(126): gapiOAuth2->fetchToken('[email protected]', 'YYY.php', NULL) 
#1 YYY.php(788): gapi->__construct('[email protected]', 'YYY.php') 
#2 {main} thrown in YYY.php on line 603

Tried for 2 different sites with different accounts on PHP 5.3.3.
Regenerated, recreated and reloaded several times.
Any ideas?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question