using System; using System.Threading.Tasks; using RestSharp; namespace n4_whatsapi { class Program { static void Main(string[] args) { Program.SendMessage().Wait(); } private static async Task SendMessage() { var whatsapiURL = "https://whatsapi.nube4.cloud/whatsapi/msg"; var client = new RestClient(whatsapiURL); var request = new RestRequest(whatsapiURL, Method.Post); request.AddBody("{\"instanceid\":\"instance14116\", \"token\":\"r3gkujuqh8erl340\", \"to\":\"+50258797957\", \"msg\":\"este es un mensaje de prueba c#\"}"); RestResponse reponse = await client.ExecuteAsync(request); var output = reponse.Content; Console.WriteLine(output); } } }