FoxPro Programming
connect to woocommerce with HMAC-SHA1
Gravatar is a globally recognized avatar based on your email address. connect to woocommerce with HMAC-SHA1
  2RT Business System Solution LLC
  All
  Mar 30, 2020 @ 11:23am

Hi

I am trying to use wwclient.app, to connect to woocommerce API connection I connect fine without any security GET, PUT, POST, DELETE

Once HMAC-SHA1 connection is active, how do I generate the Nonce & the Timestamp

Here is a example of what I use:

lc_url = "http://example.com/wp-json/wc/v3/" lc_table = "products" lc_consumerkey = "?&oauth_consumer_key=xxxxxxxxxxxxxx&" lc_signature = "oauth_signature=cs_733c2a0cbd47fd2b5ad31fef94749a1cf095b088&" lc_sigmethod = "oauth_signature_method=HMAC-SHA1&" lc_timestamp = "oauth_timestamp=1480656796&" lc_nounce = "oauth_nonce=2qL1ca&" lc_wccver = "oauth_version=1.0&" lc_connect = lc_url + lc_table + lc_consumerkey + lc_sigmethod + lc_signature + ; lc_timestamp + lc_nounce

lcJson = loHttp.HttpGet(lc_connect)

Error: invalid oauth_timestamp or etc. Code: 401

Thank you

Gravatar is a globally recognized avatar based on your email address. re: connect to woocommerce with HMAC-SHA1
  Rick Strahl
  2RT Business System Solution LLC
  Mar 30, 2020 @ 03:41pm

That looks like an oAuth callback request and if it is, I don't think you'll be able to fake that request. That's part of an oAuth flow that is used to verify a user and the oAuth token and other auth values (like the nonce) are generated by the authentication server.

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: connect to woocommerce with HMAC-SHA1
  2RT Business System Solution LLC
  Rick Strahl
  Mar 30, 2020 @ 11:05pm

Hi Rick

Can you send me a example of how to create this connection using your tool?

Thank you

Gravatar is a globally recognized avatar based on your email address. re: connect to woocommerce with HMAC-SHA1
  Rick Strahl
  2RT Business System Solution LLC
  Mar 31, 2020 @ 01:15pm

Not really. You need to figure what the actual API looks like.

You can generate a HMAC SHA1 hash with this:

+++ Rick ---

© 1996-2024