Issues in Notification Hub

Arpit 5 Reputation points
2025-01-08T08:30:45.03+00:00

I have use Google (FCM v1) i have added Private key , Client Email and Project IT But it give "

Response body

Download

{

"message": "Error sending notification: The notification has no target applications. The notification format is gcm. Review the credentials specified in the notification hub description and the notification format.. TrackingId:5da2a253-53eb-4416-9655-80da98ea8a0b,TimeStamp:1/8/2025 8:01:16 AM +00:00"

}"

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.
366 questions
{count} vote

1 answer

Sort by: Most helpful
  1. Shree Hima Bindu Maganti 4,150 Reputation points Microsoft External Staff
    2025-01-09T16:12:49.3266667+00:00

    Hi @Arpit ,
    Welcome to the Microsoft Q&A Platform!
    The error message indicates that the Notification Hub is unable to find any target applications for the notification you are trying to send.

    • Confirm the Private Key, Client Email, and Project ID in the Notification Hub settings match the Firebase project credentials.
    • Download the private key JSON file from Firebase Console under Service Accounts.
    • Open the Azure portal and navigate to Notification Hub > Settings > Google (GCM/FCM).
    • Ensure FCM settings are configured for v1 API and include the private key JSON.
    • Verify that devices are registered with a valid registration ID or installation ID.
    • Use the Test Send option in the Notification Hub to confirm active registrations.

    Ensure the payload is in the correct FCM JSON format.

    {
      "message": {
        "token": "device_token_here",
        "notification": {
          "title": "Test Notification",
          "body": "This is a test message"
        }
      }
    }
    
    • Use the Tracking ID (5da2a253-53eb-4416-9655-80da98ea8a0b) to check detailed logs in Azure Monitor or Application Insights.
    • Test FCM credentials directly via Postman to ensure they work.
    • Re-register devices if previously registered with older GCM configurations. Ensure compatibility with FCM v1. https://learn.microsoft.com/en-us/azure/notification-hubs/
      If the answer is helpful, please click Accept Answer and kindly upvote it so that other people who faces similar issue may get benefitted from it.

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.