What is the correct format of template registration using the RegistrationId

Mike V 41 Reputation points
2021-08-09T01:59:50.033+00:00

I have seen the apns and android template registration are using the Json format. I have seen the template registration format here, which is in JSON ( https://learn.microsoft.com/en-us/azure/notification-hubs/notification-hubs-templates-cross-platform-push-messages). I have also observed the template registration format here in xml: (https://learn.microsoft.com/en-us/rest/api/notificationhubs/create-registration)

Yet there is very small details on how to correct fill in the format for APNS and Android for the template body and additional fields using registration method(the one using registration, not installation). I hope that if you could show me the correct template registration format in xml for APNS, Android, and Baidu.

Also, may I ask will the registration process override the previous registration template format? I can observe that the installation process will override the previous installation, but what will happen if I register using the same registration ID?

BTW, the sample url here may have some problem. Please take a look: https://learn.microsoft.com/en-us/rest/api/notificationhubs/create-update-registration

Thank you

Azure Notification Hubs
Azure Notification Hubs
An Azure service that is used to send push notifications to all major platforms from the cloud or on-premises environments.
264 questions
{count} votes

1 answer

Sort by: Most helpful
  1. sadomovalex 3,626 Reputation points
    2021-08-17T14:19:40.337+00:00

    you may create simple console app and create registration to each platform using NotificationHubClient.CreateOrUpdateRegistrationAsync() method (NotificationHubClient. is class from Microsoft.Azure.NotificationHubs nuget package) with Fiddler runnig in background. And see which format is used in each case in http request in Fiddler.

    0 comments No comments