How to receive JSON payload from a digital device

Your exact code would depend on how the HTTP notification is sent to your server and on the structure of the JSON, but the first building block is to listen for the incoming post request. There are lots of WP hooks that would be suitable. One is init, e.g.: add_action(‘init’, function() { $user=”the_correct_basic_auth_username”; $password = … Read more

exclude particular category in api

I just figured it out, just in case it might be helpful for anyone in future: There is an option available to exclude a particular category – categories_exclude So, the new rest API would be: https://www.example.com/?rest_route=/wp/v2/posts&per_page=100&categories_exclude=10

Wrong encoding of dynamic block properties problem

Solved myself. The rest response ist fine. Important is not the raw response but the json encoded representation. Couse of my problem war editing the files with vi. VI reencoded the files itself. PHP & JS files need to be encoded as utf8.