I am using google oAuth for my python application in which I have the function of automatically logging into Google using Google. When I try to log in for the first time, it will be successful, but the next time if I log in, it will fail, and every time I get 500 internal server errors.
When I checked the error logs, I received the following error message on the line "credentials = oAuthFlow.step2_exchange (code)"
Failed to retrieve access token: { "error" : "invalid_grant" }
I have a valid clientId registered with Google. Can anyone tell me why this is happening. I am using python 2.7.
source share