Sending Notification & Registering Device in Notification Hub

Europa Locks 5 Reputation points
2023-07-04T12:29:41.1166667+00:00

Hi,

I am using Azure Notification Hub's REST APIs for registering devices (Android & iOS) & sending Notifications to it. I am intended to use them in Node JS API (written by me). Before that, I tried it on Postman and got 401 error having put the API url (https://europaNotificationHub.servicebus.windows.net/NotifyHub/registrations/?api-version=2020-06) Header: Content-Type: application/JSON, Authorization: Full Access Endpoint, x-ms-version: 2020-06. The body contains registration id: deviceToken, platform (gcm, fcm, apns, wns) & channelUri: deviceToken

When called from Postman, it gives a 401 unauthorized response code. Same happens in Node API (using axios).

Please provide a solution or suggestion over this.

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.
338 questions
Azure
Azure
A cloud computing platform and infrastructure for building, deploying and managing applications and services through a worldwide network of Microsoft-managed datacenters.
1,025 questions
{count} votes

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.