Authorization Token Signature Issues

I'm having problems with the authorization token signature.

    from azure.servicebus import ServiceBusService

key_name = 'RootManageSharedAccessKey' # SharedAccessKeyName from Azure portal
key_value = '***' # SharedAccessKey from Azure portal
service_namespace = 'lenioService' 
sbs = ServiceBusService(service_namespace,
                        shared_access_key_name=key_name,
                        shared_access_key_value=key_value)

## To receive Messages !

sbs.create_subscription('cdmessages', 'AllMessages')

msg = sbs.receive_subscription_message('cdmessages', 'AllMessages', peek_lock=False)
print(msg.body)

      

It gives me this error:

 Traceback (most recent call last):
  File "C:\Users\RH-TH\Desktop\azureTest.py", line 14, in <module>
    sbs.create_subscription('cdmessages', 'AllMessages')
  File "C:\Python27\lib\azure\servicebus\servicebusservice.py", line 497, in create_subscription
    _dont_fail_on_exist(ex)
  File "C:\Python27\lib\azure\__init__.py", line 890, in _dont_fail_on_exist
    raise error
WindowsAzureError: Unknown error (40103: Invalid authorization token signature)

      

I followed: https://github.com/Azure/azure-sdk-for-python

Any help would be greatly appreciated.

+3


source to share





All Articles