- Posts: 7
- Thank you received: 0
public void PushOverSend(string Title, string Msg)
{
System.Collections.Specialized.NameValueCollection queryString = new System.Collections.Specialized.NameValueCollection();
queryString["token"] = "Application API Token/Key";
queryString["user"] = "Your User Key";
queryString["title"] = Title;
queryString["message"] = Msg;
try {
System.Net.ServicePointManager.ServerCertificateValidationCallback = new System.Net.Security.RemoteCertificateValidationCallback(delegate { return true; });
using (System.Net.WebClient client = new System.Net.WebClient()) {
client.UploadValues("https://api.pushover.net/1/messages.json", queryString);
}
} catch (Exception ex) {
Console.WriteLine(ex.Message);
}
}
PushOverSend("EasyIoT Message", "Test Message from my PushOver Code!");
Please Log in or Create an account to join the conversation.