401 – Missing Authorization Header

  • Ian Bate
    Participant
    # 5 months ago

    Hi

    I’ve installed the miniOrange API Authentication plugin and set it to Basic Authentication.

    I’m trying to post a new WordPress post but I get a 401. i.e.

    https://mydomain.com/wp-json/wp/v2/posts/
    POST verb
    The Authorization header exists in the post.
    Content-Type header is application/json
    Body is –
    {
    “title”: “Test”,
    “status”: “draft”,
    “content”: “Some content”,
    “slug”: “test-post”
    }

    I’ve added these 2 lines to the _httaccess file.
    RewriteCond %{HTTP:Authorization} ^(.*)
    RewriteRule .* – [e=HTTP_AUTHORIZATION:%1]

    Still no luck, any suggestions gratefully received.
    Thanks

    dhruv
    Participant
    # 5 months ago

    Hi there,

    Thanks for reaching out to us.

    Could you please share the error response you are getting while requesting?
    Also, could you please the request format?

    However, you can take help from our developer documentation where you will find the curl and the postman request file to create the post with Basic Authentication. [DEVELOPER DOCUMENTATION]

    Let us know If you have any questions or concerns. We’d be happy to help you.

    Thanks
    Team miniOrange

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.