Invalid access token despite updated JWT token

Using this template helps us debug your issues more effectively :slight_smile:

Description
Hi, I am using the Zoom API to create and update meetings. I just tested creation and it worked fine. But when updating, I am getting error.

Error
The error, as seen in the curl response is

{ā€œcodeā€:124,ā€œmessageā€:ā€œInvalid access token.ā€}

Here is my code in PHP:

    $url = "https://api.zoom.us/v2/accounts/myid/meetings/".$zoomid;
    $httpmethod = "PATCH";

    $data = array(
        "topic" => $ptitle,
        "type" => 2,
        "start_time" => $starttime,
        "timezone" => 'America/New_York',
        "duration" => 90,
        "password" => null,
        "agenda" => $agenda,
        "settings" => array(
            "host_video" => true,
            "participants_video" => false,
            "join_before_host" => true,
            "mute_upon_entry" => false,
            "watermark" => true,
            "approval_type" => 2,
            "audio" => 'both',
            "auto_recording" => 'none',
            "enforce_login" => false,
            "enforce_login_domains" => null,
            "alternative_hosts" => null
        )
    );

    $data_string = json_encode($data);

    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 => $httpmethod,
        CURLOPT_POSTFIELDS => $data_string,
        CURLOPT_HTTPHEADER => array(
            "authorization: Bearer theJWTtoken",
            "content-type: application/json"
        ),
    ));

    $response = curl_exec($curl);

The PHP vars above are valid, and what I show above as theJWTtoken is the token that I see at App Marketplace under credentials. Also ā€˜myidā€™ shown above in the API url is my valid account id.

Just canā€™t figure out what might be going on. Ideas?

Hey @huetherb,

Thanks for reaching out. Can you confirm which field(s) youā€™re trying to update? Have you tried passing only these fields, and removing any fields youā€™re not updating/are passing null values for?

Let me knowā€”thanks!
Will

Hi, not sure what was going on, but now all is well!

Glad to hear it! :slight_smile:

Best,
Will