Support » Plugin: Simple JWT Login - Login and Register to WordPress using JWT » Is it possible to create Post with the WordPress API ?

  • Resolved Fabien Picard

    (@picfab)


    Hi with “JWT Authentication for WP REST API” it’s possible to create Post with API after login with your plugin ?
    I arrive to connect user, create and delete user but if I use the token for create post (with this route : wp-json/wp/v2/posts) I have an error 401.
    If I understand, your plugin it’s for manage users registration but not all the API ?

    Bets Regards

Viewing 1 replies (of 1 total)
  • Plugin Author nicu_m

    (@nicu_m)

    Hello @picfab,

    Have you checked the “All WordPress endpoints checks for JWT authentication” option from the General section?

    This is a beta option, and there might be issues.
    I’ve just checked, and I was able to create a post using the JWT.
    Here is an example:

    
    POST: 
    https://localhost/wordpress/?rest_route=/wp/v2/posts&jwt={{JWT}}&content=test
    
    

    I’ve got a 201 ( Created ) Status code.

    Let me know if you still have this issue.

    Best regards,
    Nicu.

Viewing 1 replies (of 1 total)
  • The topic ‘Is it possible to create Post with the WordPress API ?’ is closed to new replies.