• Resolved jdsteinbach

    (@jdsteinbach)


    Hi, I’m using your plugin on my site (listed below in your plugin’s system report). The calendar I’m using is from a Google Apps account and has correct permissions for sharing/public reading.

    When I have a properly-formed referrer in Google’s Calendar API Console for this API key, I get the following error:

    While trying to retrieve events, Google returned an error:
    
    Error calling GET https://www.googleapis.com/calendar/v3/calendars/REDACTED.calendar.google.com/events?singleEvents=true&maxResults=2500&timeMin=2016-06-19T00%3A00%3A00%2B00%3A00&timeMax=2017-07-17T23%3A59%3A59%2B00%3A00&key=REDACTED: (403) The referrer null does not match the referrer restrictions configured on your API key. Please use the API Console to update your key restrictions.
    
    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.

    However, if I temporarily remove the referrer from the Google API Console whitelist (which, of course, isn’t safe for a public site), then the calendar events successfully load. Are you aware of any reason that Google interprets the plugin’s request referrer as null and not the actual site domain? If so, is there something that I can change (either server-side or in the plugin/WP settings) to repair this?

    ### WordPress Installation ###
    
    Site Name: Redeemer Bible Church
    Home URL: https://www.redeemercolorado.com
    Site URL: https://www.redeemercolorado.com
    Version: 4.5.3
    Locale: en_US
    Timezone: America/Denver
    Multisite: No
    Permalinks: /%category%/%postname%/
    WP Memory Limit: 128 MB
    WP Debug Mode: Yes
    Script Debug: No
    
    ### Active Theme ###
    
    Theme: RBC Theme - 1.0.0
    Child Theme: No
    Parent Theme: -
    
    ### Active Plugins ###
    
    WP Remote: 2.7.6
    Yoast SEO: 3.3.4
    Advanced Custom Fields PRO: 5.3.9.2
    EWWW Image Optimizer: 2.9.3
    Simple Calendar: 3.1.2
    Regenerate Thumbnails: 2.2.6
    Gravity Forms: 2.0.2
    Mailgun: 1.4
    
    ### Server Environment ###
    
    Web Server: Apache/2.4.7 (Ubuntu)
    PHP Version: 5.5.9-1ubuntu4.17
    MySQL Version: 5.5.49-0ubuntu0.14.04.1
    Server Timezone: UTC
    Display Errors: No
    Safe Mode: No
    Memory Limit: 256M
    Upload Max Filesize: 2M
    Post Max Size: 8M
    Max Execution Time: 30
    Max Input Vars: 1000
    fsockopen: Yes
    cURL: 7.35.0
    OpenSSL/1.0.1f
    SOAP: Yes
    SUHOSIN: No
    WP Remote POST: Yes
    WP Remote GET: Yes
    
    ### Client Information ###
    
    IP Address: 159.203.213.103
    Browser: Chrome 51.0.2704.106 (Apple)

    https://wordpress.org/plugins/google-calendar-events/

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Contributor Nick Young

    (@nickyoung87)

    I don’t think we actually check or send this information from the plugin. I will have to do some testing to verify that for sure though.

    Plugin Contributor Nick Young

    (@nickyoung87)

    Yeah we don’t send anything with this. There is not anything I can see that would be easy to change for this without modifying the plugin code.

    • This reply was modified 7 years, 7 months ago by Nick Young.
    Thread Starter jdsteinbach

    (@jdsteinbach)

    If I attempt to run the API call just from the URL bar, I get the following error:
    message: "The request did not specify any referer. Please ensure that the client is sending referer or use the API Console to remove the referer restrictions."

    Thanks for answering – guess I need to figure out why Google thinks there’s no domain referer on the request.

    Thread Starter jdsteinbach

    (@jdsteinbach)

    I reset the Google API referer to use IP address instead of domain & it works now. Again, thanks for helping!

    Plugin Contributor Nick Young

    (@nickyoung87)

    Awesome thanks for posting your solution, glad it’s working!

    Just ran into the same problem of Google ignoring previously accepted domains. Switched to IP address and calendar displayed. Also found that the API Manager would not store domains and ip’s unless I’m doing something wrong. For our calendar example, see http://www.thesailingchannel.tv/product/red-dot-on-the-ocean-matt-rutherford/

    I have the same problem but my hosting company does not seem to have a constant IP address from where my website is being served.
    Could I suggest that for added security the addon is upgraded and referrers included. Perhaps adding this as an option in the Settings.

    Martin

    Plugin Contributor Nick Young

    (@nickyoung87)

    @mcdragon,

    It is possibly something we will add in the future but I am not 100% certain about it.

    For right now it is best to just leave the referrer blank and follow the API Key setup exactly as documented here: https://docs.simplecalendar.io/google-api-key/

    I will add that as an enhancement request though so that we at least have it somewhere on our radar to discuss.

    Thanks!

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Error: (403) The referrer null does not match the referrer restrictions…’ is closed to new replies.