• Resolved moehamid2018

    (@moehamid2018)


    Hello,
    i am getting this error:
    here are the logs:

    
    API Response:
    Array
    (
        [headers] => Requests_Utility_CaseInsensitiveDictionary Object
            (
                [data:protected] => Array
                    (
                        [request-id] => 259556f0-ffbf-11e7-9f64-4309d9bd7007
                        [www-authenticate] => HHMAC
                        [content-type] => application/json;charset=UTF-8
                        [content-length] => 39
                    )
    
            )
    
        [body] => {"errors":[{"code":"DATE_NOT_RECENT"}]}
        [response] => Array
            (
                [code] => 401
                [message] => Unauthorized
            )
    

    if this is caused by difference in time zones: Apple server time zone can't be changed. It might be difficult to change our servers time zone. Any other suggestions.
    Can there be other causes?
    Thanks in advance.

    The page I need help with: [log in to see the link]

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Bradford Campeau-Laurion

    (@potatomaster)

    The signature that is created for every API request is calculated using the current server time. If the clock on your server is set to an incorrect time zone or is simply too far off the current time, the signature will come up as invalid. Unfortunately, there’s nothing we can do in the plugin to correct this.

    Your best bet is to follow up with your hosting company. Sorry for the inconvenience.

    Thread Starter moehamid2018

    (@moehamid2018)

    Thanks Bradford.
    What do you mean by: “incorrect time zone or is simply too far off the current time” please?

    Thread Starter moehamid2018

    (@moehamid2018)

    I mean, how do you know what Apple’s News Publisher time zone is, so that i can adjust my wp setting.

    Thread Starter moehamid2018

    (@moehamid2018)

    Does changing the time inside wp settings have no effect? It actually has to be the hosting server itself?

    Plugin Author Bradford Campeau-Laurion

    (@potatomaster)

    This is a mismatch between the server time and what the API is expecting. Unfortunately, I can’t offer any help beyond what’s already been given. I suggest if you’re still stuck, please follow up with your hosting company or Apple News support. This isn’t anything to do with the plugin itself and beyond our capability to fix.

    Thread Starter moehamid2018

    (@moehamid2018)

    Thanks Bradford.
    We figured it out. it was an NTP issue.
    We host on AWS, and the time sync packages (NTP) were a little bit out of sync, so we deleted them and installed chrony instead and that worked.
    For anyone who is interested, here are the instructions (under configuring the Amazon time sync services):
    https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/set-time.html

    thanks again and great job on the plugin. We appreciate all your work and help.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘DATE_NOT_RECENT’ is closed to new replies.