Quantcast
Channel: Active questions tagged rest - Stack Overflow
Viewing all articles
Browse latest Browse all 3655

Post with REST API on Wordpress.com [Error 401, not allowed]

$
0
0

I want to post articles with rest on one of my wordpress.com websites (wordpress website hosted on the free wordpress.com platform).

Endpoint, GET on: https://public-api.wordpress.com/wp/v2/sites/donnadulcinea.wordpress.com/posts

With Basic-Auth header. Body of the request (for test),

{"title":"New Rest Post"}

Response:

{"code": "rest_cannot_create","message": "Sorry, you are not allowed to create posts as this user.","data": {"status": 401    }}

What's wrong? Where may I found one final example for a really simple posting on a wordpress.com domain?


Viewing all articles
Browse latest Browse all 3655

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>