com.windowsazure.messaging.NotificationHubsException: Error: HTTP/1.1 401 Unauthorized - <Error><Code>401</Code><Detail>InvalidSignature: The token has an invalid signature..TrackingId:d7252e01-8545-43b6-a548-5958770c7bfd_G2,TimeStamp:10/26/2021 3:38:01 AM</Detail></Error>
Why is this not a Bug or a feature Request?
A clear explanation of why is this not a bug or a feature request?
Setup (please complete the following information if applicable):
final String HUB_PATH = "Test_" + UUID.randomUUID();
NamespaceManager namespaceManager = new NamespaceManager("My Real DefaultFullSharedAccessSignature");
// Create new Hubs
final NotificationHubDescription hubDescription = new NotificationHubDescription(HUB_PATH);
hubDescription.setGcmCredential(new GcmCredential("Real FCM API Key"));
NotificationHubDescription notificationHub = namespaceManager.createNotificationHub(hubDescription);
But this one is ok.
NamespaceManager namespaceManager = new NamespaceManager("My Real DefaultFullSharedAccessSignature");
NotificationHubDescription hub = namespaceManager.getNotificationHub("My Real Hubname");
assertNotNull(hub.getGcmCredential());
Query/Question When I follow this gcm example, https://github.com/Azure/azure-notificationhubs-java-backend/blob/34f78aae53d1132d7334e0a370edaa5a95893956/NotificationHubs/test/com/windowsazure/messaging/e2e/HubCrudsE2E.java#L50 I have a 401 error. But when I change an existing hubname; I already made it on portal; and I try get NotificatonHub, then it is ok. I have a 401 error only when trying to create a new hub.
Why is this not a Bug or a feature Request? A clear explanation of why is this not a bug or a feature request?
Setup (please complete the following information if applicable):
JDK 11
Following causes error.
But this one is ok.