botkit
botkit copied to clipboard
Botkit Webex API client not returning data
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
I think the data is now in rooms.items
let rooms = await bot.api.rooms.list()
console.log(rooms.items);