You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
812 B

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);
}
}
}