Meeting Reports

What is the difference between the API calls “v2 /metrics/meetings” and “v2/report/users/{user_id}/meetings”

A meeting that is appearing for a particular user on “v2/report/users/{user_id}/meetings” is not appearing on “v2 /metrics/meetings” on the same time frame.

Hey @dt227883,

Thank you for reaching out. The Metrics API endpoint is meant to get near real-time information about a meeting where the information returned is also slightly different information and requires a Business Plan. Conversely, the Report API endpoint is intended to return historical meetings and just requires a Pro Plan.

I hope that helps to answer your question. If you have any further issues please let us know.

Thanks,
Max

Hi Max,

Thanks for your answer.

I have a project where I have to produce a reports of meetings with over 95 participants over a period of 6 months.

Which API you think will be the best suited for this purpose?

Kind Regards,


Deiby Quezada

Hey @dt227883,

Since our GET Meeting Reports endpoint (/reports/user/userId/meetings) returns a participant count in the API response, and allows you to query the past 6 months of data, I’d recommend that endpoint.

Hope this helps,
Will

Hi Will,

The problem with that API on our environment is that it checks every user and we have 12,074 (8,545 licensed users, to be more exact).

I am using “v2/metrics/meetings”, which only give me info on the individual meetings, but I am running into a problem because after a some calls the “next_page_token” token start yielding errors.

Here is a sample of my python code:

def list_meetings(self, date_from, date_to):
        """
        List total live or past meetings that occurred during...
        ...a specified period of time.  The month should fall...
        ...within the last six months.
        https://marketplace.zoom.us/docs/api-reference/zoom-api/dashboards/dashboardmeetings
        """
        
        get_url = f"{self.base_url}v2/metrics/meetings"
        
        # Query Parameters
        params = {"from": date_from, "to": date_to, "page_size": 250, "type": "past"}
        # 1st API call
        response = requests.get(url=get_url, params=params, headers=self.headers, proxies=self.proxies)
        
        total_meetings = response.json()["total_records"]
        token = response.json()["next_page_token"]
        records = response.json()["meetings"]
        page_size =response.json()["page_size"]        

        print(token)                
        
        while len(token) > 0:
            try:
                # Query Parameters
                params = {"from": date_from, "to": date_to, "page_size": 250, "type": "past", "next_page_token": token}
            
                # 2nd API call
                time.sleep(1)
                response = requests.get(url=get_url, params=params, headers=self.headers, proxies=self.proxies)                
            
                token = response.json()["next_page_token"]
                print(token)
            
                # Add Records to json
                records += response.json()["meetings"]
            
            except KeyError as err:
                print(err, token)
                time.sleep(2)
        
        return records

Hey @dt227883,

Thanks for clarifying—In reference to:

I am using “v2/metrics/meetings”, which only give me info on the individual meetings, but I am running into a problem because after a some calls the “next_page_token” token start yielding errors.

Can you share an example of the error you’re running into and the corresponding request? I’m happy to take a closer look.

Best,
Will

Hey Will,

When I run the script above after an undermine number of executions it seems that the “next_page_token” starts yielding an error:

NZ7Vra6KftH86AgF5sXCo0aXaU18oQ9GN619
jb2Qp1RnMQCHjk9lcipb6Zyr7DpV0R7JIz20
OLg9UvciPECK0W0x1NRVgcHNISb3pzDDLg21
wPbt2HaGMxDpRBfDTocIdLsyI5934z57sT22
'next_page_token' wPbt2HaGMxDpRBfDTocIdLsyI5934z57sT22
'next_page_token' wPbt2HaGMxDpRBfDTocIdLsyI5934z57sT22
'next_page_token' wPbt2HaGMxDpRBfDTocIdLsyI5934z57sT22
'next_page_token' wPbt2HaGMxDpRBfDTocIdLsyI5934z57sT22
'next_page_token' wPbt2HaGMxDpRBfDTocIdLsyI5934z57sT22
yz7rHHKv48j3KwSEhbxNLaAt9U1VR0g7fa23
x4yjFdZDx5r6s1FXqijeXqdptPf3qmIN7t24
brd7ZexwOfUI58rohFhNOHr2MGhuB2xTnF25

Hi @will.zoom and @MaxM

Any suggestion on the code I sent?

Hey @dt227883,

Thank you for the update. I’m not sure how we missed your response but thank you for pinging us to bring it to our attention. Just to clarify, when I’m seeing 'next_page_token' wPbt2HaGMxDpRBfDTocIdLsyI5934z57sT22 in that block of text, that’s coming from the caught KeyError exception here:

except KeyError as err:
   print(err, token)
   time.sleep(2)

If that’s the case, I would log the requests that are causing that KeyError to make sure that the keys you expect are there. It’s possible that there isn’t another page to those meetings which causes the KeyError when you attempt to fetch the Next Page Token.

I hope that helps! Keep me posted.

Thanks,
Max

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