I'm working with API of Google. Everything was working fine when suddenly it displays this error:
Fatal error: Uncaught Google_Service_Exception: { "error": { "code": 401, "message": "Request had invalid authentication credentials. Expected OAuth 2 access token, login cookie or other valid authentication credential.
In order to sort this out I had to create new credential but the thing is the error come again often and it is a kind of annoying as I have to reboot the computer,etc..
Anyone know how can i fix this?
EDITING
Now I put everything in a server with a domain .com. I verified the domain with google. I changed the credentials. I was using before OAuth 2.0 client IDs . Now I am using API keys. Everything was working fine for hours. Now I have the same error.
Any idea?