This project is read-only.

X-WNS-Match for notification delete

In according with this, we can send a X-WNS-Match notification to delete app’s notification in action center in various ways:  all, group, single (with tag) or both.

NOTE: We need also to change the request method from default “POST” to “DELETE” and set ContentType to None.

So, when we’ll set the X_WNS_Match property, in every case (except "all"), we need also to pass the TAG\GROUPS ID.

Let’s see an example for All

$tok = GetToken();
$cha = GetNewChannel();
$Options = new WindowsNotification\WNSNotificationOptions();
$Options->SetAuthorization(new WindowsNotification\OAuthObject($tok));
//SET X-WNS-Match to all
//Set X-WNS-Type to none
//Set content type to none
$Notifier = new WindowsNotification\WindowsNotificationClass($Options);

How you can see, it’s simple to send a notification for All.

For Group\Tag\Both we need to pass an array to "SetX_WNS_MATCH" method while the other code is always the same.



$Options->SetX_WNS_MATCH(WindowsNotification\X_WNS_Match::Tag,array("tag" => "value"));


$Options->SetX_WNS_MATCH(WindowsNotification\X_WNS_Match::Group,array("group" => "value"));


$Options->SetX_WNS_MATCH(WindowsNotification\X_WNS_Match::TagAndGroup,array("group" => "grvalue","tag" => "tagvalue"));


REMEMBER: Set always in the Options the Content-Type to None and when you perform the send, you need to pass the HTTPMethod::Delete (it is “DELETE” verb in HTTP header)

Last edited May 16, 2015 at 4:39 PM by Andreabbondanza, version 5