botkit icon indicating copy to clipboard operation
botkit copied to clipboard

Botkit Webex API client not returning data

Open derchrisuk opened this issue 2 years ago • 1 comments

Hi,

as I'm currently in the process of upgrading my modules from 0.7.5 to latest 4.15.0, I discovered some issues. I was utilizing the Webex API client included with Botkit on several occasions. One was to get a list of all the rooms the bot was a member of. So for a simple start I tried this:

let rooms = await bot.api.rooms.list();
console.log(rooms);

Which I hoped would work the same way as in 0.7.5 with the bot.botkit.api.rooms.list But this one is showing me an empty array. Doing the same API endpoint on the Developers Website with the Bot token is working fine though.

And I'm also able to get details of rooms I know the ID of using bot.api.rooms.get

  • Botkit version: 4.15.0
  • Messaging Platform: Webex
  • Node version: 18.0.0
  • Os: Debian

derchrisuk avatar May 03 '22 14:05 derchrisuk

I think the data is now in rooms.items

    let rooms = await bot.api.rooms.list()
    console.log(rooms.items);

jmfinn9 avatar May 25 '22 15:05 jmfinn9