Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
wordpress and woocommerce rest api
#4
(07-19-2022, 05:46 PM)GeorgeBairaktaris Wrote: I have problem with authentication.
Everything I am trying I am getting 401 error.
"HTTP/1.1 401 Unauthorized"

Why are you hard-coding a cookie? Cookies are dynamic. Also, why are you using the Request.CustomHeaders property instead of the TIdHTTP.CookieManager property?

Why are you hard-coding the OAuth credentials? Where are you getting those values from? Things like timestamps and nonces are dynamic, they can't be hard-coded since they change value between requests.

(07-19-2022, 05:46 PM)GeorgeBairaktaris Wrote: Last attempt I tried was from the Postman call like this:

That is your Indy request, not your Postman request. What does the Postman request look like?

(07-19-2022, 05:46 PM)GeorgeBairaktaris Wrote: In Postman I use Consumer Key and Consumer Secret with 0auth1 and its working.

Can't help you without seeing the Postman example. Are you submitting the same OAuth credentials on each Postman request, and they don't fail due to expired parameters?

Reply


Messages In This Thread
RE: wordpress and woocommerce rest api - by rlebeau - 07-19-2022, 10:36 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)