Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The API key-pair is invalid. #36

Open
pirtpal-rwit opened this issue Apr 27, 2020 · 1 comment
Open

The API key-pair is invalid. #36

pirtpal-rwit opened this issue Apr 27, 2020 · 1 comment

Comments

@pirtpal-rwit
Copy link

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
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants