2K members online now
2K members online now
Dive into multiple domain (Cross/Sub) tracking, implementing Ecommerce and Enhanced Ecommerce, setting up Event tracking, and Universal Analytics code.
Guide Me

GAPI: Failed to authenticate user

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

We've being using the GAPI service but lately we've being encountering some problems with it which interfere with our work. Please find below the description of the problem:

Fatal error: Uncaught exception 'Exception' with message 'GAPI: Failed to authenticate user. Error: "{
"error": "invalid_grant",
"error_description": "Bad Request"

This issue comes up when refreshing the token using the email credentials and a .p12 key; the email already has the necessary permissions to access the report.
We have two servers with exactly the same settings but they only work fine with one of the servers, and presents the error mentioned above in the other. Also, timezone in both servers is synchronised.

We appreciate an early response on this.

Thanks for your help.

1 Expert replyverified_user

Re: GAPI: Failed to authenticate user

Top Contributor
# 2
Top Contributor
Can you track the token request with developer tools or similar?
I would then compare them for any differences between servers...
To make bad day worse, spend it wishing for the impossible

Antti Nylund, Google Analytics Top Contributor
Did my answer solve your issue? If yes, please mark it as the ‘Best Answer.’ Otherwise keep on asking.