I’m trying to use oauth 2.0 for the google + api on my site, and I keep getting: { “error”: { “errors”: [{ "domain": "global", "reason": "authError", "message": "Invalid Credentials", "locationType": "header", "location": "Authorization" }], “code”: 401, “message”: “Invalid Credentials” } } The thing is, I don’t know why this is happening. I have a [...]
I’m trying to use oauth 2.0 for the google + api on my site, and I keep getting:
{
"error": {
"errors": [{
"domain": "global",
"reason": "authError",
"message": "Invalid Credentials",
"locationType": "header",
"location": "Authorization"
}],
"code": 401,
"message": "Invalid Credentials"
}
}
The thing is, I don’t know why this is happening. I have a valid access token from google, but google tells be it is invalid. I know that the token has not expired because the json data is request from google within 10 seconds of getting the access token. Here is the process that I’m using:
- Get user to authorize the request.
- Gets request code from google.
- Uses
cUrlto request access token with the request code from google. - Puts the access code into a php session.
- redirects back to the main page.
- Main page detects session variable is set and doesn’t display login link.
- Php on main page uses
readFileto get the json response from google. - Google returns invalid credentials.
here is a example uri generated by php that is inserted into readFile:
Help please?
Related posts:
- Google API 2 legged Oauth : "Token invalid – Invalid AuthSub token."
- Google API 2 legged Oauth : "Token invalid – Invalid AuthSub token."
- Google API 2 legged Oauth : "Token invalid – Invalid AuthSub token."
- Google API 2 legged Oauth : "Token invalid – Invalid AuthSub token."
- Google Access Token Request: Invalid Token/Signature
Comments on this entry (2 comments)
Did you like this post? You can share your opinion with us! Simply click here.