v2 issues with meetings endpoint

Is anyone else having issues pulling meeting lists with the new v2 API? 

I had it working last week, and now it’s only returning live meetings even though i’ve set type to past; the next_page_token also only returns the first page of results. 

The concept is fairly straight forward so I am having a hard time believeing my code is wrong, the docs aren’t explicit so there could be an issue with the library I am using to generate my token.

the JWT token is being genreate as follows:

def generate\_jwt(ttl):
 # jwt payload
 jwt\_payload = {
 'iss': cfg['zoom']['api\_key'],
 'exp': datetime.utcnow() + timedelta(seconds=ttl)
 }

 # Encode signature and spit out a utf-8 string
 signature = str(jwt.encode(jwt\_payload, cfg['zoom']['api\_secret'], algorithm='HS256'), 'utf-8')

 return signature

and meeting list is being pull like this:

def get\_meeting\_list\_single\_page(token, page\_size, type, get\_from, get\_to, next\_page\_token):
 # GET meetings API endpoint
 r = s.get('%s/metrics/meetings' % base\_url, headers={'Authorization': 'Bearer %s' % token},
 data={'type': type, 'from': get\_from, 'to': get\_to, 'next\_page\_token': next\_page\_token},
 verify=False)

 

FWIW, I also tried entering jibberish in some of the data fields and the request completes, returning page one of live meetings.   Must be a default when the call isn’t “complete”? 

If your not getting a “invalid token” message your token generation should be fine.

 

Please verify that you are not running into a rate limit https://zoom.github.io/api/#rate-limits /metrics/meetings has max of 1 request per minute

Very strange, it’s like the first call I make gets stuck. Let me fiddle around and get back to you.  It’s definietely not a rate limit as i’d get a 429 back instead of a 200 (and presumably no data).

I figured it out.  Apparently, you can no longer include a payload as data in a request.  you have to include your payload as a query in the endpoint url.  

so my original r = s.get line should now show as: 

r = s.get('%s/metrics/meetings/?type=%s&from=%s&to=%s' % (base\_url, type, get\_from, get\_to),
 headers={'Authorization': 'Bearer %s' % token}, verify=False)

That works as expected.  

This also explains why the original code was always returning live meetings; it’s the default when you don’t provide any query paremeters since they are all optional

HI Matt,

 

Correct, for this endpoint the parameters you are trying to pass are “Query Arguments” not “Body Arguments”