WP-API / jwt-auth

Enable JSON Web Token authentication for the WordPress REST API.
GNU General Public License v2.0
106 stars 25 forks source link

The API key-pair is invalid. #36

Open pirtpal-rwit opened 4 years ago

pirtpal-rwit commented 4 years ago

i used https://github.com/WP-API/jwt-auth for authentication

I created api-key and api-secret in profile page

{
    "api_key": "3AHiAkLol3YeOLLEQrDdQ8tNf",
    "api_secret": "zdQ$YiV*3CKOhm^cTNgr*tZ7XrsaX3nQ"
}

Also added in config file

define('JWT_AUTH_SECRET_KEY', '5yDulS24m?Q]rD[rt[W0@X*J*c?QJNnXig=hh+ID{YKi)]H#:9E!Zi%-]q^l]I2A');
define('JWT_AUTH_CORS_ENABLE', true);

when i call api (http://acms-srs.localhost/wp-json/wp/v2/token), showing errors

{
    "code": "rest_authentication_invalid_api_key_secret",
    "message": "The API key-pair is invalid.",
    "data": {
        "status": 403
    }
}

enter image description here

mike-moede commented 4 years ago

I had the same issue. As a workaround I ended up creating a new user with the same role, and that key pair worked.