Notification payload is invalid (WNS)

Josu 15 Reputation points
2023-03-08T10:33:20.2433333+00:00

Hello,

I have created a simple code to create and register notification template, I have tried several templates, ones from the examples provided from Microsoft and also an empty one. I use property Templates and method CreateOrUpdateInstallacionAsync(...) and it works perfect without errors.

When I try to use this template using SendTemplateNotificationAsync I always receive this error (It's necessary enable EnableTestSend property) "Notification Payload Is invalid", but if I use native methods like SendWindowsNativeNotificationAsync() it works fine, the result is the same using code or using Azure Notification Hub portal option "Test send".

This result is the same despite I use parameters or not, also SendWindowsNativeNotificationAsync works fine with exactly the same payload.

Notification Hub log does not show more info about these errors, using Sevice Bus Explorer the error is the same.

This code works perfectly without errors with GCM/Firebase and Android, but with WNS it does not work.

Any clue?

Thanks.

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.
325 questions
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
7,913 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Josu 15 Reputation points
    2023-07-24T09:46:20.09+00:00

    Finally it started to work without doing anything, maybe I was banned because using free tier? :) I do not know...

    It took around one week before started to work

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.