# Joining Meeting Timeout popup OK button behaviour

**URL:** <https://devforum.zoom.us/t/joining-meeting-timeout-popup-ok-button-behaviour/44372>\
**Category:** Web\
**Created:** [February 26, 2021, 4:16pm UTC](https://devforum.zoom.us/t/joining-meeting-timeout-popup-ok-button-behaviour/44372 "2021-02-26T16:16:47Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![ghiamar](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/ghiamar/32/23524_2.png) [@ghiamar](https://devforum.zoom.us/u/ghiamar)\
**Post date:** [February 26, 2021, 4:16pm UTC](https://devforum.zoom.us/t/joining-meeting-timeout-popup-ok-button-behaviour/44372/1 "2021-02-26T16:16:48Z")

</div>

Hi! If I schedule a meeting and someone loads the meeting URL in my webpage before the meeting has started, it gets the following screenshot

 ![imagen](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/b/8/b880dea2f954b64d888bae41b77bf74974cc73f2.png)

If the user clicks the **Ok** button, it gets redirected to te leaveURL page, but the user really didn’t want to leave, because the meeting has not started yet.

Is there a possibility to catch the **Ok** button click event in that particular popup?  
Is there a possibility to somehow tell the user that the meeting has not yet started but it’s up and scheduled?

Client Web SDK v1.9.0

Thanks!

---

<div class="post-metadata">

**Author:** ![MaxM](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/maxm/32/42303_2.png) [@MaxM](https://devforum.zoom.us/u/MaxM)\
**Post date:** [February 27, 2021, 1:58am UTC](https://devforum.zoom.us/t/joining-meeting-timeout-popup-ok-button-behaviour/44372/2 "2021-02-27T01:58:02Z")

</div>

Hey @ghiamar,

Thank you for reaching out to the Zoom Developer Forum. Good questions!

> [@ghiamar](#):
>
> Is there a possibility to catch the **Ok** button click event in that particular popup?

We don’t have a method to catch events from that button right now. You can test writing custom JS to override the events on that element but that would be outside the scope of what we can support here and may cause other issues in the [Web SDK](https://marketplace.zoom.us/docs/sdk/native-sdks/web#zoom-web-sdk).

> [@ghiamar](#):
>
> Is there a possibility to somehow tell the user that the meeting has not yet started but it’s up and scheduled?

Yes, that’s definitely possible and I think that would be the best method to avoid sending the user to the leaveUrl before the meeting starts. In order to accomplish this, you can call the [Get a Meeting API](https://marketplace.zoom.us/docs/api-reference/zoom-api/meetings/meeting) and use the `status` property from what is returned.

If the status is `started`, it’s safe to allow the user to join the meeting. If the status is `waiting` you can display your own information to the user.

I hope that helps! Let me know if you have any questions.

Thanks,  
Max

---

<div class="post-metadata">

**Author:** ![ghiamar](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/ghiamar/32/23524_2.png) [@ghiamar](https://devforum.zoom.us/u/ghiamar)\
**Post date:** [February 27, 2021, 3:50pm UTC](https://devforum.zoom.us/t/joining-meeting-timeout-popup-ok-button-behaviour/44372/3 "2021-02-27T15:50:16Z")

</div>

Cool, can I get [Get a Meeting API](https://marketplace.zoom.us/docs/api-reference/zoom-api/meetings/meeting) endpoint using PHP curl and JWT API Key and API Secret?

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [March 1, 2021, 5:59pm UTC](https://devforum.zoom.us/t/joining-meeting-timeout-popup-ok-button-behaviour/44372/4 "2021-03-01T17:59:49Z")

</div>

Hey @ghiamar ,

Yes, checkout this example here on how to make an API request with a JWT Token:

> **[JSON Web Tokens (JWT) - Authorization - Documentation](https://marketplace.zoom.us/docs/guides/auth/jwt#samples)**
>
> JWT With Zoom
> 
> The Zoom API uses JSON Web Tokens (JWT) to authenticate account-level access. These tokens offer a method to establish secure server-to-s...

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![ghiamar](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/ghiamar/32/23524_2.png) [@ghiamar](https://devforum.zoom.us/u/ghiamar)\
**Post date:** [March 1, 2021, 7:15pm UTC](https://devforum.zoom.us/t/joining-meeting-timeout-popup-ok-button-behaviour/44372/5 "2021-03-01T19:15:19Z")

</div>

Great nailed it! Posting PHP code using **[php-jwt](https://github.com/firebase/php-jwt)**

```
    $api_key = $apiKey;
    $api_secret = $apiSecret;
    $payload = array(
        'iss' => $api_key,
        'exp' => time() + 15,
    );
    $jwt = JWT::encode($payload, $api_secret);
    $curl = curl_init();

    curl_setopt_array($curl, array(
        CURLOPT_URL => "https://api.zoom.us/v2/meetings/$meetingID",
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_ENCODING => "",
        CURLOPT_MAXREDIRS => 10,
        CURLOPT_TIMEOUT => 30,
        CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
        CURLOPT_CUSTOMREQUEST => "GET",
        CURLOPT_HTTPHEADER => array(
            "authorization: Bearer $jwt",
            "content-type: application/json"
        ),
    ));

    $response = curl_exec($curl);
    $err = curl_error($curl);

    curl_close($curl);

    $ret = new JObject;
    $ret->result = false;
    $ret->response = '';

    if (!$err) {
        $ret->result = true;
        $ret->response = json_decode($response);
    }
```

---

<div class="post-metadata">

**Author:** ![MaxM](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/maxm/32/42303_2.png) [@MaxM](https://devforum.zoom.us/u/MaxM)\
**Post date:** [March 1, 2021, 10:33pm UTC](https://devforum.zoom.us/t/joining-meeting-timeout-popup-ok-button-behaviour/44372/6 "2021-03-01T22:33:03Z")

</div>

Hey @ghiamar,

I’m glad to hear that resolved your issue! Thank you for posting what workd for you. Please don’t hesitate to reach out if you encounter any further issues or questions.

Thanks,  
Max

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/6/1/614bdd549b610bbaa46ff934617683a02bdaa03c.png) [@system](https://devforum.zoom.us/u/system)\
**Post date:** [April 1, 2021, 8:33am UTC](https://devforum.zoom.us/t/joining-meeting-timeout-popup-ok-button-behaviour/44372/7 "2021-04-01T08:33:45Z")

</div>

Closed on April 1, 2021, 8:33am UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
