AuthX: API explorer URL wrong for WordPress
I think that the URL that the API explorer spits out for WordPress for authx is wrong.
Testing on a fresh buildkit install...
# Does not work!
CRM_URL='http://wp-demo.localhost:7979/wp-admin/admin.php?page=CiviCRM&q=civicrm%2Fajax%2Fapi4%2FContact%2Fget'
# Works!
CRM_URL='http://wp-demo.localhost:7979/civicrm/ajax/api4/Contact/get'
CRM_AUTH='X-Civi-Auth: Bearer 123'
curl -X POST -H "$CRM_AUTH" "$CRM_URL" \
-d 'params=%7B%22limit%22%3A25%7D'
I assume that WordPress is going to always be in control of authentication to wp-admin/admin.php
urls and hence that URL in the first example will never work.
@colemanw - it looks like you wrote the code that displays this - Adding a true param to the resUrl var to make it public fixes the issue I think. Will submit a PR...