Skip to main content
Question

Return lists from .getItems is empty.

  • May 22, 2025
  • 1 reply
  • 2 views

Forum|alt.badge.img

hi, trying to pull the sub folders or files from root, but return object has always 0 as total_count. need some help, thanks.

Here is the code,

client.folders
.getItems('0', {
usemarker:false,
fields:'name',
offset:0,
limit:25,
})
.then((items) => {
console.log(items);
});
 
and here is the result

{

  total_count: 0,

  entries: [],

  offset: 0,

  limit: 25,

  order: [

    { by: 'type', direction: 'ASC' },

    { by: 'name', direction: 'ASC' }

  ]

}

1 reply

Forum|alt.badge.img

Hello, 

Can you confirm that the user associated with your token is who you expect? You can do that using this endpoint: https://developer.box.com/reference/get-users-me/. I suspect that you may be using a JWT app, which defaults to a token associated with the app's service account

Best, 

Kourtney, Box Developer Advocate