Push

var client = new RestClient("https://api.messageflow.com/v2.1/push");
var request = new RestRequest(Method.POST);
request.AddHeader("content-type", "application/json");
request.AddHeader("authorization", "REPLACE_KEY_VALUE");
request.AddParameter("application/json", "{\"applications\":[\"XXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\"],\"to\":[{\"receiver\":\"example-device-id\",\"externalId\":\"xxx-xxx-xxx-xxx\",\"type\":1}],\"title\":{\"pl\":\"test\",\"en\":\"test\"},\"body\":{\"pl\":\"test\",\"en\":\"test\"},\"defaultLanguage\":\"pl\",\"image\":\"http://absolute.url/to/image\",\"silent\":false,\"sound\":\"sound-file.wav\",\"scheduleTime\":\"2020-01-01 12:12:12\",\"ttl\":1540377351,\"externalData\":{\"test\":\"x\",\"test1\":false},\"advanced\":{\"subtitle\":\"subtitle-only-ios\",\"lockscreenVisibility\":1,\"icon\":{\"small\":\"/relative-icon-file-path\",\"large\":\"/relative-icon-file-path\"}},\"action\":{\"url\":\"http://absolute.url/to/redirect/on/click\",\"type\":2},\"actionButtons\":[{\"button\":1,\"icon\":\"my_icon.png\",\"action\":{\"url\":\"www.google.pl\",\"type\":1}}]}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);

Last updated