Skip to main content

Bots.GetBotsAsync

Description

The API gets the details of all the Assistant Buddies from the connected Control Room.

Signature [C#]

Task<List<BotInfo>> GetBotsAsync()

Properties

Output

PropertyDescription
List<BotInfo>Returns the details of all the Assistant Buddies

Remarks

Use GetBotsAsync API to return all available Assistant Buddies information from the Control Room.

Example

C#
public void GetAssistantBuddies()
{
IControlRoomContext context = LoginControlRoom();

var assistantBuddies = Task.Run(() => context.Bots.GetBotsAsync()).Result;
foreach (BotInfo botInfo in assistantBuddies)
Console.WriteLine("BotName: " + botInfo.BotName);
}
C#
public IControlRoomContext LoginControlRoom()
{
IControlRoomContext context;
string connectionString;

connectionString = "ServerUrl=https://demo.onnitellibuddies.com;UserName=demoadmin;Password=password";
context = new ControlRoomContext(connectionString);

context.Open();
return context;
}