Next_page_token intermittently invalid

Description
I have an app that calls metrics/meetings, for the current month of meeting data. So, by the end of the month, it can get up to about 300-350 calls. Not a little, but not a ton. I paginate through these with a 2500ms time delay in between, to avoid 429 errors. What is happening, is that I am getting intermittent 400 error requests…it seems like the next_page token provided is sometimes invalid.

Error
Error: Request failed with status code 400

Which App Type (OAuth / Chatbot / JWT / Webhook)?
JWT, no issues with authentication, as I have several tools using the same auth methods.

Which Endpoint/s?
/metrics/meetings

How To Reproduce (If applicable)
Steps to reproduce the behavior:

  1. let getPage = async (next) => {
    return new Promise((resolve, reject) => {
    axiosRetry(axios, { retryDelay: axiosRetry.exponentialDelay});
    axios.request(${zoomBaseUrl}/metrics/meetings, {
    headers: {
    Authorization: zoomAuth
    },
    params: {
    type: ‘past’,
    from: firstDayThisMonth, //shorten scope for testing
    to: yesterday,
    page_size: 300,
    next_page_token: next || null
    }
    })
    <…then, later down in the code…>
    if (page.next_page_token) {
    await timeoutPromise(2500);
    firstTime = false;
    console.log(next page ${page.next_page_token});
    return await pageData(page.next_page_token);

  2. I had a screenshot, but it won’t let me embed media items in the post.

Additional context
This is an intermittent issue. Sometimes I re-run the same script, and it works, right after having not worked, with 0 intervention from me. When the script lives on my computer, it passes through the failed call, and still works 100% of the time (albeit with that page of data missing)…but when it is in a CI/CD pipeline, the pipeline will fail without 100% successful API calls. Adding in a retry mechanism has helped, and I have 3 successful consecutive calls, but not consistent yet. Wondering why a page might register as invalid. Timeout shouldn’t be a concern here.

I added a lib in node called axiosretry that is solving this for now. I don’t know why the next_page_token registers invalid from time to time, and I can see from another ticket that this has happened elsewhere.

Regardless, its no longer an issue for me.

Thanks,

Hi, @patrickgi,

Thank you for calling attention to the behavior you are seeing. I am happy to share your details with our Engineering team to take a closer look. Would you be able to submit a ticket with our support with your account details along with the API request/response? From there we can look at our logs and see if the Engineering team needs to troubleshoot. Submit A Request For Support Here

Best,
Donte

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