woocommerce / wc-api-python

A Python wrapper for the WooCommerce API.
https://pypi.org/project/WooCommerce/
MIT License
212 stars 112 forks source link

Invalid Signature for multiple filter parameters #8

Closed norbert-sebok closed 8 years ago

norbert-sebok commented 8 years ago

I get 401 status code and this error if I try to use more than one filter parameters:

{u'errors': [{u'message': u'Invalid Signature - provided signature does not match', u'code': u'woocommerce_api_authentication_error'}]}

I'm using v3.

One parameter works well:

api.get('orders?filter[limit]=1000') api.get('orders?filter[created_at_min]=2015-01-03')

But there is an Invalid Signature error for multiple filter params:

api.get('orders?filter[limit]=1000&filter[created_at_min]=2015-01-03')

The example from the REST API docs is failing too:

api.get('orders?status=completed&filter[created_at_min]=2013-11-01&filter[created_at_max]=2013-11-30')

Am I doing something wrong? Or is there a bug in the generate_oauth_signature method?

claudiosanches commented 8 years ago

Must be in alphabetical order.

norbert-sebok commented 8 years ago

How do you mean alphabetical order?

I tried:

api.get('orders?filter[created_at_min]=2015-01-03&filter[limit]=1000')

and

api.get('orders?filter[limit]=1000&filter[created_at_min]=2015-01-03')

The result is error for both.