Forum Replies Created

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter pcfjojo

    (@pcfjojo)

    I have been using the “POST MAN” but, I will try with OKHTTP for make the Oauth request, anyhow I have no idea about where i have to start from
    1. I wil call wp rest api endpint /wp-json/ to get the Auth request url to get the authentication token.

    2. with the token, which i get from the response, i will have to request for Authorization (HMAC ecc).

    I dont konw that OKHTTP can do this or not.

    Could you please give me some suggessions?

    • This reply was modified 9 years, 3 months ago by pcfjojo.

    Thanks you so much for the reply, I just got success with this plugin.
    Could you please tell me, which is the correct plugin for production.

    I am also facing the same problem, I have tired to change the .htaccess file as follow.

     # BEGIN WordPress
        <IfModule mod_rewrite.c>
        RewriteEngine On
        RewriteCond %{HTTP:Authorization} ^(.*)
        RewriteRule ^(.*) - [E=HTTP_AUTHORIZATION:%1]
        RewriteBase /speedy/
    
        RewriteRule ^index\.php$ - [L]
        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteCond %{REQUEST_FILENAME} !-d
        RewriteRule . /speedy/index.php [L]
        </IfModule>
    
        # END WordPress

    anyhow it gives always 401 unauthorized response. Any help please.

    I also have the same problem , please let me know if you have found the solutions.

    I also have the same issue, I can get result go “GET” request using postman. When i try to make “POST” request, I get the following error.

    {
      "code": "rest_cannot_delete",
      "message": "Sorry, you are not allowed to delete this post.",
      "data": {
        "status": 401
      }
    }

    After i did googling, I have got more suggestion specially to make changes on .htaccess file as follow.

    RewriteEngine On
    RewriteBase /speedy/
    SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1
    RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /speedy/index.php [L]

    “speedy” is my folder name for wordpress installation.
    Anyone can help me?
    I am using postman with Basic Auth with Authorization header.

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