0

I have generated the consumer key and consumer secret but I don't know how to aply it to authenticate on Postman. This is the screenshot below:

screenshot from 2016-08-17 14-28-18

The url looks like this: https://mystore.com/wp-json/wc/v1/coupons?oauth_consumer_key=ck_XXXXXXXXXXXXXXX&oauth_signature_method=HMAC-SHA1&oauth_timestamp=1471440398&oauth_nonce=Qaq8cK&oauth_version=1.0&oauth_signature=XXXXXXXXXXXXXXXXXXXXXXXXXw=

But this is returning error 401:

{ "code": "woocommerce_rest_cannot_view", "message": "Sorry, you cannot list resources.", "data": { "status": 401 } } I have read the the documentation but it didn't show any examples.

LoicTheAztec
  • 229,944
  • 23
  • 356
  • 399
Abdullq
  • 69
  • 1
  • 8

1 Answers1

1

You can send your credentials via Authentication header if your site runs on HTTPS (it should if you're running WooCommerce).

Here's the relevant part of the docs:
https://woothemes.github.io/woocommerce-rest-api-docs/?shell#authentication-over-https

Aurelia
  • 1,052
  • 6
  • 28