Understand the concept of instllationid and push channels in azure notification hub

Mike V 41 Reputation points

After reading the docs on
https://learn.microsoft.com/en-us/azure/notification-hubs/notification-hubs-push-notification-registration-management and https://learn.microsoft.com/en-us/rest/api/notificationhubs/create-overwrite-installation

I am using the restful Api format for notification hub. I understand that I require installation id and push channels and user id to finish the push notification. But the explanation of these three fields does not seem very clear to me.

The senario:
The frontend App will request Apple Push Notification System for a token. Then he will send the token to my backend Api. Then In order to fill in these three fields, should I put the token as the installation Id and put the user's email in database as the user Id? I have no idea where to fetch the content to fill in the push channel field.

Thank you very much!

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.
271 questions
0 comments No comments
{count} votes

Accepted answer
  1. ajkuma 22,851 Reputation points Microsoft Employee

    @Mike V ,

    The token from APNS is the push channel. We sometimes also refer to this as the device/PNS handle. Installation ID and user ID are user-defined (as per your requirement/as in your case)
    From the 2nd doc’s link you'd shared- “Create or overwrite an installation” – Request body ‘pushChannel’ is ‘The PNS handle for this installation (in case of WNS the ChannelUri of the ApplicationTile).’

    You can see the JSON example here:

        "installationId": "12234",   
        "userID": "MyAmazingUser",  
        "tags": ["foo", "bar"],   
        "platform": "apns",   
        "pushChannel": "ABCDEF-123456-…"   

    For other related Notification metrics, you may wish to see the thread I'd responded here: decipher metrics

0 additional answers

Sort by: Most helpful