//Send Message to users' console/Messaging app public object SendMessage(int IntegratonID, MessageClass message) { message.RequesterApplication = IntegratonID; string DataToSend = JsonConvert.SerializeObject(message); var result = PostRequest("user/message/", Data: DataToSend, ContentType: "json").Result; dynamic RObject = JsonConvert.DeserializeObject(result); return(RObject); }
//Send Webhook Messages to users' account. public object SendWebhookMessage(int IntegratonID, string WebhookFunctionName, MessageClass message) { string Data = JsonConvert.SerializeObject(message); string url = String.Format("user/application/webhook/{0}/", WebhookFunctionName); var result = PostRequest(url, Data: Data).Result; dynamic RObject = JsonConvert.DeserializeObject(result); return(RObject); }