Internal error. Bug with VK API?

When trying to send message, error occurs "internal error". How to fix it?
Here is my code:
public static void spam()
{
 var words = new List<string> { "Hi" };
Console.WriteLine("delay");
 var delay = int.Parse(Console.ReadLine());
 Console.WriteLine("number of the chat");
 var chatsID = long.Parse(Console.ReadLine());

try
{
while(true)
{
 vkApi.Messages.Send(new MessagesSendParams()
{
 ChatId = chatsID,
 Message = words.ToString(),
 RandomId = new Random().Next()
});
Thread.Sleep(delay);
}
}
 catch(Exception e)
{
Console.WriteLine(e.Message);
}
 }


With authorization there is no problem, but just in case:
public static VkApi vkApi = new VkApi();
 public static void auth()
{
 //Console.WriteLine("Paste the key, please");
 var key = @"";
 ApiAuthParams api = new ApiAuthParams()
{
 AccessToken = key,
 Settings = Settings.All
};

try
{
vkApi.Authorize(api);
 if (!vkApi.IsAuthorized)
 Console.WriteLine("Error with Authorization");
 Console.WriteLine("Successfully authorized");
}
 catch (Exception e)
{
Console.WriteLine(e.Message);
}
 }

5e0e02623c7e6892562844.png
April 4th 20 at 00:35
0 answer

Find more questions by tags VKontakteC#