0

I'm using this API to get some events: https://www.googleapis.com/calendar/v3/calendars/primary/events?timeMin={time}&timeMax={time}Z&timeZone={zone}

And using a access token as a Bearer token. I used this request so many times and all worked.

Now I'm getting this error:

{
"error": {
    "code": 401,
    "message": "Request had invalid authentication credentials. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project.",
    "errors": [
        {
            "message": "Invalid Credentials",
            "domain": "global",
            "reason": "authError",
            "location": "Authorization",
            "locationType": "header"
        }
    ],
    "status": "UNAUTHENTICATED"
}

}

1 Answer 1

0

Found the problem. The token was expired and I didn't realize at the time. But the error message didn't help. Why don't they just sent a error like (token expired or token invalid)?

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.