• Resolved Vander

    (@vxnder)


    Hi!

    Some months ago I set up a JWT token authentication for posting new posts in my wordpress. It was working successfully until I moved my site to a WordPress multisite.

    The token is being created correctly but when I fetch REST API to POST to a post type, I get this error:

       POST https://xxxxxx.xxx/wp-json/wp/v2/dashboard 401 (Unauthorized)

    Searching about it in your docs and found this 401 error that seems similar to mine but headers are being sent and I see nothing in my server logs.

    I also tried to add this piece of code to my htaccess apache server but nothing seems to happen:
    Img link

    Do you have any other idea about how to proceed on this? No idea why this is happening in my multisite wordpress :/

    Thanks!

    • This topic was modified 1 year, 3 months ago by Vander. Reason: Missing word in title
Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Support vidugupta

    (@vidugupta)

    Hi @vxnder ,

    Thank you for reaching out!

    To help you out with the issue you are facing regarding authenticating APIs in the Multisite environment, can you please share the HTACCESS rules you have configured for your site?

    Moreover, if you’d like to get on a go-to-meeting to help resolve this, please feel free to reach out to us via the plugin support form. Our team will be happy to help.

    Thanks,
    Team miniOrange

    • This reply was modified 1 year, 3 months ago by vidugupta.
    • This reply was modified 1 year, 3 months ago by vidugupta.
    Thread Starter Vander

    (@vxnder)

    Hi @vidugupta ,

    thanks for your answer.

    My current htaccess is the following code:

    RewriteEngine On

    RewriteBase /

    RewriteRule ^index\.php$ - [L]

    # add a trailing slash to /wp-admin

    RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]

    RewriteCond %{REQUEST_FILENAME} -f [OR]

    RewriteCond %{REQUEST_FILENAME} -d

    RewriteRule ^ - [L]

    RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]

    RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]

    RewriteRule . index.php [L]

    After the last line is where I tried to paste the code from the docs.

    This is the standard .htaccess for a subdirectory multisite + its specifics. it’s a directory-based multisite

    Thanks!

    Thread Starter Vander

    (@vxnder)

    ¿Any news or ideas?

    Thanks!

    Plugin Support vidugupta

    (@vidugupta)

    Hi @vxnder ,

    Sorry for the delay.

    To further investigate this issue, could you please reach out to us via the plugin support form? This will allow us to schedule a meeting and look into the issue more effectively.

    Thanks,
    Team miniOrange

    Thread Starter Vander

    (@vxnder)

    Hi @vidugupta,

    I did it a few days ago.

    Thanks

    Thread Starter Vander

    (@vxnder)

    Hi.

    Any news? I also contacted through contact form from your website and no one answered :/

    Thanks

    Plugin Support vidugupta

    (@vidugupta)

    Hi @vxnder ,

    We have reached out to you over the email you sent. Can you please check your spam folder and confirm if you recieved our email?

    Thanks,
    Team miniOrange

    Thread Starter Vander

    (@vxnder)

    Hi @vidugupta ,

    I’ve checked my email and nothing found even in spam folder :/

    Can you send it again?

    Thanks

    Plugin Author mowpr

    (@mowpr)

    @vxnder,

    Can you please drop an email again to apisupport@xecurify.com so we can help you?

    Thanks,
    Team miniOrange

    Thread Starter Vander

    (@vxnder)

    Hi @mowpr ,

    thanks for your reply. I’ve just sent an email to the address. Many thanks!

    Plugin Author mowpr

    (@mowpr)

    Hi @vxnder,

    As were already able to contact our techincal team on our support. We are marking this thread as closed for now and you can open a new one if have any questions.

    Thanks,
    Team miniOrange

Viewing 11 replies - 1 through 11 (of 11 total)

The topic ‘POST 401 (Unauthorized) in a WordPress Multisite’ is closed to new replies.