Media is not available via rest-api while Posts etc. is…

[ad_1]

HI, I just started to integrate the Rest-API into our internal CRM system in order to post and update certain custom post types on our website. Trying to do so with “Posts” and CPTs works fine.

I use CURL-commands in our CRM-database to connect with the website and use

But when I try to access “Media” the access seems restricted, see here:

{
    "code": "rest_upload_no_data",
    "message": "Keine Daten bereitgestellt.",
    "data": {
        "status": 400
    }
}

I am not aware to have this set manually, can cannot find any rule or parameter in wp-config.php or .htaccess and I believe not to have any plugin running that alters the default setting (well, you never know).

Any idea how I can “open” the Rest-API for “Media”?

And while I am already asking: Can I block normal users from the web to read/see the Rest-Api while my CRM system can do access it?

Kind regards, Martin

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer