Files search API bug

Hi there!
I experiencing a bug with Hubspot Files API.
I have a folder named “My folder” with 392 files. I need to get a list of these files in JS. I make a several requests to /files/v3/files/search?limit=100&parentFolderId=<my-folder-id>&after=<after> endpoint to retrieve all files.
If run my program several times, it always will return an array of 392 items, but almost always it loses some items and some other items are occurring several times in result list.
From time to time the situation is repeated and always a different number of elements is lost, and, accordingly, a different number of elements is repeated.

Has anyone encountered such a problem?

What additional information can I provide?

Hi, @progr0, thanks for including those details.

A few questions to help get us started:

  • Can you share an example request?
  • Can you provide more clarity on what you mean by missing? Does the response show a total of 392, but when you examine the results it’s actually a lesser amount? 347or some other number?
  • For the duplication, are you seeing the same type of repetition? Meaning, is it always doubled or quadrupled, for example? Or are the duplicated amounts random?
  • Can you share your request minus any API or private app keys or tokens?
  • Could you share a result here? So that others can clearly see the result you are describing?

Thank you very much! — Jaycee