admin管理员组

文章数量:1122846

When requesting the test API, getting the following response:

{
    "errors": [
        {
            "error_code": "",
            "error_message": "Sorry, you cannot list resources."
        }
    ]
}

The credentials are OK, REST API keys have both read/write permissions. I tried with newly generated API keys, same problem.

When requesting the test API, getting the following response:

{
    "errors": [
        {
            "error_code": "",
            "error_message": "Sorry, you cannot list resources."
        }
    ]
}

The credentials are OK, REST API keys have both read/write permissions. I tried with newly generated API keys, same problem.

Share Improve this question edited Apr 22, 2019 at 12:50 fuxia 107k38 gold badges255 silver badges459 bronze badges asked Apr 22, 2019 at 11:16 Dyna Rizki HabibahDyna Rizki Habibah 11 silver badge2 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0

Here ya go

The original .htaccess looked like this:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

Then I changed it to the following

<IfModule mod_rewrite.c>
RewriteEngine On

RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

RewriteBase /
RewriteRule ^index\.php$ - [L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

and now it works !!!

本文标签: rest apiquoterrormessagequot quotSorryyou cannot list resourcesquot using WooCommerce API