Android authentication

The best way to authenticate an app with the REST API would be to use OAuth. There’s a good section on OAuth Authentication the REST API documentation site. You will need to install the OAuth1 plugin on your site as well. There are some gotchas with implementing the OAuth plugin on WordPress. I found this … Read more

404/500 error on /wp-json

Are you trying to use that function without first initiating it in an action? It should be done like so: add_action( ‘rest_api_init’, ‘add_custom_users_api’); function add_custom_users_api() { register_rest_route( ‘route’, array( ‘methods’ => ‘GET’, ‘callback’ => ‘function’, )); }

How can I register a new REST context?

GraphQL is more flexible in general than the built-in REST API, regarding customizing the response. GraphQL is currently not shipped with the WordPress core, but is available as a plugin. Let’s look at the existing endpoints for the WP_Post object(s). We note that it is possible to use the _fields query parameter to include specific … Read more

Rest API rename media

After much digging, it doesn’t seem to be possible. I did craft some automation with a Node script that basically does this: Check if the name is correct. If it’s not, then download the image, upload with a new name and update the product. If everything goes smooth, delete the original image. Same is repeated … Read more

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