I am trying to delete a page using WordPress rest API.
I keep receiving this message:
This is the code I use in the terminal:
curl --request DELETE -I --user admin:password http://site.local/wp-json/wp/v2/pages/18909
This is the response:
curl --request DELETE -I --user admin:password http://site.local/wp-json/wp/v2/pages/18909 HTTP/1.1 401 Unauthorized Server: nginx/1.16.0 Date: Thu, 15 Dec 2022 10:07:36 GMT Content-Type: application/json; charset=UTF-8 Transfer-Encoding: chunked Connection: keep-alive X-Powered-By: PHP/7.4.1 X-Robots-Tag: noindex Link: <http://site.local/wp-json/>; rel="https://api.w.org/" X-Content-Type-Options: nosniff Access-Control-Expose-Headers: X-WP-Total, X-WP-TotalPages, Link Access-Control-Allow-Headers: Authorization, X-WP-Nonce, Content-Disposition, Content-MD5, Content-Type Allow: GET
Which version of Local is being used?
What Operating System (OS) and OS version is being used?
- macOS monteray 12.6