403 User Rate Limit Exceeded and 401 Invalid Credentials - Google Analytics API v3 -
we able data google analytics using oauth2.0, getting 403 user rate limit exceeded , 401 invalid credentials.
on server start getting,
severe: unable refresh token com.google.api.client.auth.oauth2.tokenresponseexception: 403 user rate limit exceeded
and subsequent requests giving,
com.google.api.client.googleapis.json.googlejsonresponseexception: 401 unauthorized { "code" : 401, "errors" : [ { "domain" : "global", "location" : "authorization", "locationtype" : "header", "message" : "invalid credentials", "reason" : "autherror" } ], "message" : "invalid credentials" }
i have tested access token following url :
https://www.googleapis.com/oauth2/v1/tokeninfo?access_token=xxxxxxxx
i getting valid access token message, still getting invalid credentials. have tried oauth2 playground, here getting same message.
any resolve issue.
make sure caching access tokens , making reasonable number of refresh requests. refreshing in tight loop (or multiple threads or servers in cluster) same user lead 403.
the 401 error due fact getting new access token failed , using expired one.
Comments
Post a Comment