php sdk question regarding creation of list

Jared Lindo

New Member
Good day!

I've been working on an extension which automatically creates a list and pull data from third party program.

It's working before until today, I had this issue.

The response coming from the api for creating the list isn't returning the value of the created list uid anymore.

So I have this code inside a function

$lists = new MailWizzApi_Endpoint_Lists();
$lists_response = $lists->create( some array data );
$response = $lists_response->body->toArray();
$created_list_id = $response['list_uid'];
return $created_list_id;

the response body didn't include the created list data anymore just like what it's doing before.

Do you have an idea why?

Thank you in advance.
Attached is the one I'm getting. It's returning 200 instead of 201


  • Screen Shot 2017-07-12 at 1.13.58 AM.png
    Screen Shot 2017-07-12 at 1.13.58 AM.png
    45.4 KB · Views: 7
@Jared Lindo - I see the Content-Type is text/html. This is not correct, it has to be application/json since the api returns json.
My advice is to have a look in the server logs and see if you can spot any issue.
You can also try another lists, just for testing and see if it does the same for all lists.
You're right. It should be application/json.

Does this mean there's nothing wrong with my codes? I can see something in the logs related to "Nginx upstream timed out (110: Connection timed out)". Does it matter?

Our mailwizz is hosted on DigitalOcean by the way with Nginx setup. Thanks
Nginx upstream timed out (110: Connection timed out)". Does it matter?
Yes, it does :-s because that is why you get that content type, because nginx responds with an error page instead of accessing php and serving mailwizz, so try and see how you can improve the nginx configuration, maybe increasing the timeout values.