Custom Endpoints not working

You’re using the wrong route. The first two arguments of register_rest_route() ar the namespace, and the route. The URL to a REST API endpoint is: (your domain) + ‘/wp-json/’ + (namespace) + “https://wordpress.stackexchange.com/” + (route) So the full URL to your endpoint is: http://domain.com/wp-json/knpv-get/get-submissions But you’re attempting to view: http://domain.com/wp-json/knpv-get Which won’t return the response … Read more

WordPress REST API parameters are not affecting a response

If results should be ordered by a method other than the default asc or desc, you should also pass the orderby parameter. This gives you the ability to order by title, date, parent, type and many more that can be seen here. For example, a request ordering the results a-z by title would be: http://api-address.com/wp-json/wp/v2/posts/?categories=12&order=asc&orderby=title

Advanced Access Manager: RESTful endpoint to refresh token

At first glance it looks like you need to POST the token as a ‘jwt’ property in a JSON object, the same way you’d POST it to the validate endpoint: curl -X POST \ http://dev.wordpress/wp-json/aam/v1/refresh-jwt \ -H ‘Content-Type: application/json’ \ -H ‘cache-control: no-cache’ \ -d ‘{ “jwt”: “0yJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE1NDM4OTExNjQsImV4cCI6MTU0Mzk3NzU2NCwidXNlcklkIjoxfQ.0wGIbcTDH5yWSsdStZFct_-auyOFJqf3NKQasTCs4QU” }’ (based on https://forum.aamplugin.com/d/4-how-to-validate-jwt-token) It doesn’t look … Read more

REST API and filtering by meta value

Add a third parameter in the get_post_meta() function as true, that will return the single value of the current post meta, if you don’t set it it will return an array of the values. What is happening now is that internally the query is trying to compare the meta_value with an array instead of a … Read more

rest Api jwt authentication for get methodes

The token just authenticates the request as coming from a specific user. You still need to use the permissions callback to check if that user has permission for whatever it is you’re doing. If you omit the permissions_callback argument when registering the route then the route is public. If you only need to check if … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)