Title: Error 401 in creating post using rest-api
Last modified: December 15, 2017

---

# Error 401 in creating post using rest-api

 *  [jangirsuresh95](https://wordpress.org/support/users/jangirsuresh95/)
 * (@jangirsuresh95)
 * [8 years, 6 months ago](https://wordpress.org/support/topic/error-401-in-creating-post-using-rest-api/)
 * I am trying to use Basic Auth using username / password and I am getting below
   error which i see in rest api logs. I tried both Java based and Node JS based
   client. My user is Admin and have whole access. I am able to read the post but
   creating post have the problem.
 * {
    “data”: { “code”: “rest_cannot_create”, “message”: “Sorry, you are not allowed
   to create posts as this user.”, “data”: { “status”: 401 } }, “headers”: { “Allow”:“
   GET” }, “status”: 401 }

Viewing 1 replies (of 1 total)

 *  Moderator [t-p](https://wordpress.org/support/users/t-p/)
 * (@t-p)
 * [8 years, 6 months ago](https://wordpress.org/support/topic/error-401-in-creating-post-using-rest-api/#post-9786435)
 * Useful resource: [https://developer.wordpress.org/rest-api/reference/posts/](https://developer.wordpress.org/rest-api/reference/posts/)

Viewing 1 replies (of 1 total)

The topic ‘Error 401 in creating post using rest-api’ is closed to new replies.

## Tags

 * [auth](https://wordpress.org/support/topic-tag/auth/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 2 participants
 * Last reply from: [t-p](https://wordpress.org/support/users/t-p/)
 * Last activity: [8 years, 6 months ago](https://wordpress.org/support/topic/error-401-in-creating-post-using-rest-api/#post-9786435)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
