Curl PHP request producing unwanted repeated requests

Description
A clear and concise description of what the question is.
Using oAuth, JWT, Guzzle or CURL. I have tried this using combination of all of these. I send the request for the meeting and the process just repeats. I end up with a list of meetings before finally, I hit the 100 per day limit.

Error
The full error message or issue you are running into.
‘{“code”:429,“message”:“You have exceeded the daily rate limit (100) of Meeting Create/Update API requests permitted for this particular user. You may resume these requests at GMT 00:00:00.”}’ (length=190)

Which App Type (OAuth / Chatbot / JWT / Webhook)?
JWT (I have tried OAuth as well)

Which Endpoint/s?
https://api.zoom.us/v2/users/’.USER_ID.’/meetings

How To Reproduce (If applicable)
Steps to reproduce the behavior:
function UseToken($accToken,$order_id){

$Meet=new Meet;

$arrObj=$Meet->gatherOrderDetails($order_id);

$meetings=count($arrObj);

//var_dump($arrObj);

for($i=0;$i<$meetings;$i++){

//echo("Meetnigs=".$meetings."<br>");

    $ThisMeeting=json_decode($arrObj[$i]);

    $ThisJSON= [

            'topic' => 'Video consultation with Dr. xxxxxxxxxxxxxx',

            'type' => 2,

            'start_time' => $ThisMeeting->start,

            'duration' => 20, // 20 mins

            'agenda'=>$ThisMeeting->topic,  

            'settings' => array(

                'host_video'=>TRUE,

                'participant_video'=>TRUE,

                'cn_meeting'=>FALSE,

                'in_meeting'=>FALSE,

                'join_before_host'=>FALSE,

                'mute_upon_entry'=>FALSE,

                'watermark'=>FALSE,

                'use_pmi'=>FALSE,

                'approval_type'=>0,

                'audio'=>'voip',

                'auto_recording'=>'cloud',

                'enforce_login'=>FALSE,

                'enforce_login_domains'=>FALSE,

                'registrants_email_notification'=>TRUE)

            ];

    $inf=json_encode($ThisJSON,true);

    $curl = curl_init();

    $url = 'https://api.zoom.us/v2/users/'.USER_ID.'/meetings';

    //$curl = curl_init($url);

    curl_setopt_array($curl, array(

        CURLOPT_URL => $url,

        CURLOPT_RETURNTRANSFER => true,

        CURLOPT_ENCODING => "",

        CURLOPT_MAXREDIRS => 10,

        CURLOPT_TIMEOUT => 30,

        CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,

        CURLOPT_CUSTOMREQUEST => "POST",

        CURLOPT_POSTFIELDS => $inf,

        CURLOPT_HTTPHEADER => array(

        "authorization: Bearer ".$accToken,

        "content-type: application/json"

        ),

    ));r

Screenshots (If applicable)
If applicable, add screenshots to help explain your problem.

Additional context
Add any other context about the problem here.

Hi @dominicpower1, is there a specific reason you need to send these requests in a for loop?

I’m not particularly familiar with PHP, is there a reason you could imagine this is firing continuously?

Thanks for getting back to me. The loop is only if there are multiple bookings on the same order. Ive checked the output and that part is only firing once.

Sorry. As regards to possible reasons why. The only thing I could think of is somehow it was a setup issue. If Guzzle and Curl could somehow be cross reacting or I had multiple versions somewhere. It is such a strange result.

Hey @dominicpower1,

Make sure you are in bounds of our create meeting rate limits.

Thanks,
Tommy

Hi Tommy

The rate is 100 per day. This code is triggering multiple meetings to be created and it is not the loop that is causing it. I have shown the loop only triggers on this code once. I thought it maybe that the setup is not picking up on the reply and so it is sending multiple times?

It has cost me over a week so I am obviously keen to find a solution.

Thanks

Hey @dominicpower1,

That is strange! I am not super familiar with PHP so I cannot debug your code. Have you tried googling this issue to see if there is a known issue of Curl PHP request producing unwanted repeated requests?

Thanks,
Tommy