Get the list of all media from wordpress.com site

admin

Administrator
Staff member
I want to get the list of all media in my wordpress site via REST API. Based on what I found in <a href="https://developer.wordpress.org/rest-api/reference/media/#definition" rel="nofollow noreferrer">Wordpress REST API doc</a> I am using the following GET url but its not working.
Code:
https://xxx.wordpress.com/wp-json/wp/v2/media

Instead of a JSON response, i am getting an HTML page that says
Code:
Oops! That page can’t be found.