I am never able to access the API endpoints using JWT token.
-
When I use Postman app to try to test the endpoints that are protected by your plugin:
First: Auth is enabled. I use that endpoint to get a token. That works fine.
Second: I use Header: “Authorization: Bearer (that token)” to try to access api protected endpoints, as enabled in the admin ui for your plugin:
I get error:
{ "code": "invalid_username", "message": "<strong>Error</strong>: Unknown username. Check again or try your email address.", "data": null }
…every time, no matter what user I use and what new token I create.
Can you please tell me what I might be missing? Is this expected behaviour?
—
Sidenote: Without a token, i get the expected result:
{ "success": false, "data": { "message": "Your are not authorized to access this endpoint.", "errorCode": 403, "type": "simple-jwt-login-route-protect" } }
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘I am never able to access the API endpoints using JWT token.’ is closed to new replies.