GET /sites/$site/follows/

List a site's followers in reverse chronological order.

Resource Information

   
Method GET
URL https://public-api.wordpress.com/rest/v1.1/sites/$site/follows/
Requires authentication? Yes

Method Parameters

Query Parameters

Resource Errors

These are the possible errors returned by this endpoint.

HTTP Code Error Identifier Error Message
403 unauthorized User cannot access this private blog.
403 unauthorized User cannot access this restricted blog
403 unauthorized Current user does not have required capaibility to view follows.

Example

curl \
 -H 'authorization: Bearer YOUR_API_TOKEN' \
 'https://public-api.wordpress.com/rest/v1/sites/82974409/follows'
<?php
$options  = array (
  'http' => 
  array (
    'ignore_errors' => true,
    'header' => 
    array (
      0 => 'authorization: Bearer YOUR_API_TOKEN',
    ),
  ),
);

$context  = stream_context_create( $options );
$response = file_get_contents(
	'https://public-api.wordpress.com/rest/v1/sites/82974409/follows',
	false,
	$context
);
$response = json_decode( $response );
?>

Response

{
    "found": 1,
    "users": [
        {
            "ID": 78972699,
            "login": "apiexamples",
            "email": false,
            "name": "apiexamples",
            "nice_name": "apiexamples",
            "URL": "http:\/\/apiexamples.wordpress.com",
            "avatar_URL": "https:\/\/1.gravatar.com\/avatar\/a2afb7b6c0e23e5d363d8612fb1bd5ad?s=96&d=identicon&r=G",
            "profile_URL": "http:\/\/en.gravatar.com\/apiexamples",
            "site_ID": 82974409
        }
    ]
}