none
generating SasToken for JAVA RRS feed

  • Question

  • Hi am trying to use the Notification Hub REST API to send notifications from my Java backend. i am trying to use the read notification hub method in which i have the request URI. The only piece of information i am needing is the Authorisation token in which it stated

    "Token generated as specified in Shared Access Signature Authentication with Service Bus, or Service Bus authentication and authorization with Microsoft Azure Active Directory Access Control (also known as Access Control Service or ACS)."

    My Question is What do i need for this token and how do i generate it?

    Token generated as specified in Shared Access Signature Authentication with Service Bus, or Service Bus authentication and authorization with Microsoft Azure Active Directory Access Control (also known as Access Control Service or ACS).

    Token generated as specified in Shared Access Signature Authentication with Service Bus, or Service Bus authentication and authorization with Microsoft Azure Active Directory Access Control (also known as Access Control Service or ACS).

    • Moved by Jayden Gu Monday, November 21, 2016 6:34 AM Relate to Azure Notfication Hubs
    Friday, November 18, 2016 4:34 PM

All replies

  • Hi Nathanael Dennis,

    Your issue is related the Azure Notfication Hubs and I know a better forum for it: "Azure Notfication Hubs", let's move your case to there for better support.


    Best Regards,

    Jayden Gu 


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Monday, November 21, 2016 6:34 AM
  • Hi

    Notification Hub Java sdk is available here. And you can find code for generating the SAS token in generateSasToken(URI uri) method in NotificationHub.Java

    https://github.com/Azure/azure-notificationhubs-java-backend/blob/master/NotificationHubs/src/com/windowsazure/messaging/NotificationHub.java

    Thanks,
    Sateesh


    Mark Post as helpful if it provides any help.Otherwise,leave it as it is.

    Tuesday, November 22, 2016 7:39 PM
  • hi i have seen this sdk it is using the old api version so it does not work but i have gone away from the azure notification hub route and going to WNS directly thank you
    Wednesday, November 23, 2016 3:31 PM
  • thank you for the reply i moved from notification hubs to WNS directly so not looking into it further
    Wednesday, November 23, 2016 3:32 PM
  • The SDK should work fine with our latest APIs. We'd love to hear any details if you don't mind providing.

    Thanks,

    Mimi

    Thursday, November 24, 2016 6:52 AM
    Moderator
  • the api-version on the sdk is 2014-09 while on the azure documentation it is 2015-01 also the format for the service endpoint looks to be different as t expects the sharedAccessKeyName and sharedAccessKey with it seperated by ';'. Also the sdk is not on the maven repository which doesn't help my devlopment it seems to be the only azure sdk  that isnt
    Tuesday, November 29, 2016 2:03 PM