Lists/members API operations are failing without an error message

lists
api

#1

Hi,

My Lists/members operations have suddenly stopped working. They were working yesterday. I checked the API status report and it is only showing the “mainstream” operations. Have you noticed any problems with Twitter lists? I hope you can help with some suggestions.

I’m using a well-established API wrapper and all other features of my app are working fine (using the same wrapper)

On API Console, when I try this:
https://api.twitter.com/1.1/lists/members.json?owner_screen_name=somebody&cursor=-1&list_id=12345&count=4000
I’m getting a 200 OK response. Only if I go over count 4000, I get a 502 Bad gateway.

here’s an excerpt of my php code:

<?php
//defining the OAuth objects
require 'TwitterOAuth-2/vendor/autoload.php';
use TwitterOAuth\Auth\SingleUserAuth;
use TwitterOAuth\Serializer\ArraySerializer;
date_default_timezone_set('UTC');

    //have we received something from the form input
    if(($_POST['targetlist']) != 0){
                $targetlist = $_POST['targetlist'];
                echo $targetlist; //getting an output here as expected
                       
                //get the members of the ticked list
                $params = array(
                        'list_id' => $targetlist,
                        'count' => 500,
                        'include_entities' => 'false'
                );

                $response2 = $auth->get('lists/members', $params);
                //this is where the script dies completely WITHOUT any error message
                $errcheck = $auth->getHeaders();
                $respcode = $errcheck['status'];
                echo "<br>response 2 get lists/members<br>";                                           
                print_r($response2);
                         
                    if ($respcode == " 200 OK"){
                        $countids = count($response2['users']);
                            for($j = 0; $j < $countids; $j++){
                                $nonfTwid[] = $response2['users'][$j]['id_str'];
                            }
                        //do the necessary array operations with $nonfTwid
                    }
    }
?>