How can I solve an 404 not found error with POST request using Insomnia and WordPress API?

Viewed 549

I'm using WordPress API and testing my routes with Insomnia software.

Everything works good with my GET routes but not with my POST routes.

I have 2 POST routes: one to register and one to log in. I also use JWT token.

Here is my POST route to log in :

http://localhost/Barbieshop/jwt-auth/v1/token

Setting login route

Auth : no authentication

I get an 404 Not Found answer

Here is my Register route : http://localhost/Barbieshop/wp-json/wp/v2/users/register Setting for Register route

Here is my .htacess file information :

>RewriteCond %{REQUEST_URI} !^wp/
>RewriteCond %{REQUEST_FILENAME} !-f
>RewriteCond %{REQUEST_FILENAME} !-d
>RewriteRule ^(.*)$ index.php/$1
>#Plugin JWT auth
>RewriteEngine on
>RewriteCond %{HTTP:Authorization} ^(.*)
>RewriteRule ^(.*) - [E=HTTP_AUTHORIZATION:%1]

Thanks for your help !

0 Answers
Related