API Authentication with “rest_route=” style urls
-
Hi there!
I’m working on an app that works with our customer’s WooCommerce stores via the Rest API. I’m hoping to avoid making sure they have their permalinks set to pretty because it’s a barrier to integrating, and I’d like to use the lowest common-denominator if possible.
I noticed that I’m able to access the api: i.e.
https://my-wc-store.com?rest_route=/wc/v1/
with no problems, and when watching API access logs, all sub-routes are sent along to the correct place.However, authentication fails unless i use the /wp-json format urls. i.e.
https://my-wc-store.com/wp-json/wc/v1/productsI don’t see anything in the WC auth code that would prohibit the query param version from working, though the docs do say it’s unsupported… I’m not sure if there’s a simple way to achieve the goal.
I’ve tried the approach of passing the keys / secret in as query params, as well as with the authorization token with no luck.
The only endpoints we’re going to use are the endpoints are
/productsand/webhooksThanks!
The topic ‘API Authentication with “rest_route=” style urls’ is closed to new replies.