Skip to content
Advertisement

Sorry, you are not allowed to create posts as this user using curl request php

i am using curl request to make post in wordpress site every thing were working fine from 2 years suddenly wordpress curl stop working.

1 i updated the htaccess to and try every possible solution but no luck

2 i install wp basic authentication but it does not work

3 i install jwt authentication plugin but no luck

4 i assign every role to user and update password but no luck wordpress is not validating remote request.

5 in postman it show that “

JavaScript

Code:

JavaScript

Advertisement

Answer

i have added the following code to htaccess and add plugin (JSON Basic Authentication) then it start working

`RewriteCond %{HTTP:Authorization} ^(.)

RewriteRule ^(.) – [E=HTTP_AUTHORIZATION:%1]

SetEnvIf Authorization “(.*)” HTTP_AUTHORIZATION=$1`

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement