Trouble with API posts

Stratagem

New Member
Hello,

As of October 11, my API subscriptions have not been receiving new emails. I have not changed anything on a handful of sites that were working. I have other sites using the web forms that are still getting new email signups.

Upon checking, the posts through the API are returning this error:

{"status":0,"message":"Your request expired. Please refer to the documentation."}

I can't find any reference to this error.

I double checked the keys, list ID, etc. This install is running version 1.3.9.9. Again, I haven't changed the sites nor have I made any changes to MW. Yet for some reason the 8 or so sites that use the API no longer have the emails posted into MW.

Any suggestions for a fix? I know I have delayed updating to 1.4.3 (or the other recent releases). If that is the fix I will do it. As this is a production machine, I haven't wanted to change something that was working.

Thanks
 
I have tried troubleshooting this by:
1. upgrading to 1.4.8
2. adding a new api key and updating one site with it

Neither of these worked. The IPs are whitelisted and again, nothing has really changed on the MW server.

The API was working for 6 or 8 sites on two separate servers and several domains. No changes were made to the sites but for some reason now it does not work for any of them.

Please let me know if you have any suggestions. Thanks again for looking.
 
It seems that the connection is timing out (i think). Are you sure the server your sites are hosted on are able to connect to the server MailWizz is on?

Login to SSH using Putty on the server hosting your sites, then type in:

ping mailwizzdomain.com

replace mailwizzdomain.com with the domain hosting your MailWizz application. Let me know the results.

Thanks,
Mike
 
Thanks for the idea. There are no problems pinging the MW server from the remote server. I will try putting one of the API sites on the same server as MW and try that next.
 
Hey. I was just updating this... Unfortunately, running the same site on the same server as MW has also failed. The programmer that originally set this up isn't around anymore. I have another one that looked at it and found what appeared to be the connection timeout. It is on a dedicated server where nothing should be blocking the connection and nothing has been updated or changed (well, until I upgraded MW that is). The regular forms work on a bunch of sites. Just the API has a small hiccup now. I don't think it has anything to do with the recent API updates. But I'll update the files for that as well just in case.

I'll try to be patient until the MW support is back at it on the 1st.
 
Hey. I was just updating this... Unfortunately, running the same site on the same server as MW has also failed. The programmer that originally set this up isn't around anymore. I have another one that looked at it and found what appeared to be the connection timeout. It is on a dedicated server where nothing should be blocking the connection and nothing has been updated or changed (well, until I upgraded MW that is). The regular forms work on a bunch of sites. Just the API has a small hiccup now. I don't think it has anything to do with the recent API updates. But I'll update the files for that as well just in case.

I'll try to be patient until the MW support is back at it on the 1st.
Sometimes the most efficient solution is to reinstall the server (after you backup your data).
Saves you from searching the error source ad infinitum :)
 
I'll try to be patient until the MW support is back at it on the 1st.
Most likely the issue is caused by the server date/time settings, so make sure those settings are correct. Best is to keep your timezone in UTC: 00:00 to avoid such problems.
 
Hi,
I run mailwizz version 1.9.44 with PHP Version 7.4.29 and have suddenly started getting this issue for the last 8 days.

I use the PHP SDK to talk to the API. This code has been working well for the last few years. I always have my installation set to not perform automated updates.

Here is the result of an API call

Code:
MailWizzApi_Http_Response Object
(
    [url] => https://www.mydomain.com/api/lists/yz051xfo724b0/subscribers/search-by-email?EMAIL=xxxx%40icloud.com
    [headers] =>
    [contentType] => application/json; charset=UTF-8
    [httpMessage] => Bad Request
    [curlCode] => 0
    [curlMessage] =>
    [storeCurlInfo] =>
    [curlInfo] =>
    [body] => MailWizzApi_Params Object
        (
            [_data:MailWizzApi_Params:private] => Array
                (
                    [status] => error
                    [error] => Your request expired. Please refer to the documentation.
                )

            [_readOnly:MailWizzApi_Params:private] =>
        )

    [request] =>
    [_httpCode:MailWizzApi_Http_Response:private] => 400
)

Additionally if I use a application like insomnia to make a direct call I get the following


> GET /api/lists/yz051xfo724b0/subscribers/search-by-email?EMAIL=xxxx%40icloud.com HTTP/2
> Host: www.mydomain.com
> user-agent: insomnia/2020.4.2
> cookie: PHPSESSID=982cb1bfd6cfc20ad67032801312d28e
> x-mw-public-key: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> x-mw-timestamp: 1652966921
> x-mw-remote-addr:
> accept: */*

* Connection state changed (MAX_CONCURRENT_STREAMS == 100)!

< HTTP/2 400
< expires: Thu, 19 Nov 1981 08:52:00 GMT
< cache-control: no-store, no-cache, must-revalidate
< pragma: no-cache
< content-type: application/json; charset=UTF-8
< date: Thu, 19 May 2022 15:07:46 GMT
< server: LiteSpeed
< alt-svc: quic=":443"; ma=2592000; v="43,46", h3-Q043=":443"; ma=2592000, h3-Q046=":443"; ma=2592000, h3-Q050=":443"; ma=2592000, h3-25=":443"; ma=2592000, h3-27=":443"; ma=2592000
 
Hi,
I run mailwizz version 1.9.44 with PHP Version 7.4.29 and have suddenly started getting this issue for the last 8 days.

I use the PHP SDK to talk to the API. This code has been working well for the last few years. I always have my installation set to not perform automated updates.
Check response in your ticket.
 
Back
Top