I’ve a WordPress web site in wordpress.com with the Marketing strategy which permits the REST API. I can check the API by itemizing weblog posts doing a GET request to /wp-json/wp/v2/posts
, however POST request to create or modify a publish all return a 401. For instance:
$ curl --user "username:application_password" -X POST -d "title=New Title" https://instance.com/wp-json/wp/v2/posts
{"code":"rest_cannot_create","message":"Sorry, you aren't allowed to create posts as this consumer.","information":{"standing":401}}
$ curl --user "username:application_password" -X POST -d "title=New Title" https://instance.com/wp-json/wp/v2/posts/8
{"code":"rest_cannot_edit","message":"Sorry, you aren't allowed to edit this publish.","information":{"standing":401}}
username
is a consumer that I created and added to the location with Editor position. I triple checked the appliance password was right, generated a brand new one simply in case and tried that.
I requested buyer help at wordpress.com they usually advised me every thing appears to be arrange accurately on the WordPress web site.
I am writing a program that can work together with the API. Over there I attempted many various parameters, added app_name
, app_id
, proper or mistaken credentials and nothing labored.
Any concepts what else it might be?