question

KenFodero-9727 avatar image
0 Votes"
KenFodero-9727 asked azure-cxp-api edited

InvalidToken from Azure Notification Hub (WNS)

Hi,

I am trying to use Azure Notification Hub to send WNS notifications. My send is unsuccessful, and in the Notification Outcome, I receive an InvalidToken error. Looking through the ANH docs, I'm unable to find the details on causes of an "InvalidToken" error.

Is there documentation/guidance somewhere with additional details on the possible root causes of the various unsuccessful NotificationOutcomes?

Thanks

azure-notification-hubs
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

SnehaAgrawal-MSFT avatar image
0 Votes"
SnehaAgrawal-MSFT answered

Thanks for asking question! If I have understood right, you are using Azure Notification Hub to send WNS notification. As a prerequisite an active Windows Store account is required confirming that the Get notifications from apps and other senders setting is enabled.

To add to this if no notifications are reaching the device, the first step is to ensure the correct credentials are configured in the Notification Hub. The credentials must match the application that's created under a platform-specific developer account. This corresponds to the credentials received in step four of the 'Create an app in Windows Store' section in the tutorial.

Please verify the application secrets password and the package security identifier (SID) have been added to the portal correctly.

You may refer to below doc links for more details on this.

https://docs.microsoft.com/en-us/previous-versions/windows/apps/hh465407(v=win.10)?redirectedfrom=MSDN

https://docs.microsoft.com/en-us/previous-versions/windows/apps/hh913756%28v%3dwin.10%29#authenticating-your-cloud-service

https://docs.microsoft.com/en-us/previous-versions/windows/apps/hh868245(v=win.10)?redirectedfrom=MSDN


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.