Simple-Calendar icon indicating copy to clipboard operation
Simple-Calendar copied to clipboard

API Key Restrictions Issue

Open gacharijohn opened this issue 1 year ago • 1 comments

Issue: If Application restrictions are set on the API key, as illustrated here: https://prnt.sc/tmB4l_fJhf-- , the error below is rendered on the calendars:

`While trying to retrieve events, Google returned an error:

{ "error": { "code": 403, "message": "Requests from referer \u003cempty\u003e are blocked.", "errors": [ { "message": "Requests from referer \u003cempty\u003e are blocked.", "domain": "global", "reason": "forbidden" } ], "status": "PERMISSION_DENIED", "details": [ { "@type": "type.googleapis.com/google.rpc.ErrorInfo", "reason": "API_KEY_HTTP_REFERRER_BLOCKED", "domain": "googleapis.com", "metadata": { "service": "calendar-json.googleapis.com", "consumer": "projects/145630074084" } } ] } }

Please ensure that both your Google Calendar ID and API Key are valid and that the Google Calendar you want to display is public.

Only you can see this notice.`

Expected Output: Restrictions on the API key should not lead to calendars rendering the error

gacharijohn avatar Apr 02 '24 08:04 gacharijohn