Blocking

Block a User

Block a user from seeing your App.net content. This means the user will not be able to see, star, reply to, or repost your content. This user will also effectively be muted for you. This will automatically unfollow both users from each other. A user may be able to tell if they’ve been blocked by a user. For instance if @mthurman blocks @berg and @berg logs out of alpha.app.net, he could see @mthurman’s profile.

In most cases, muting a user is probably sufficient since that hides all of a user’s content from you. If a user is aggressively reposting or starring your content, blocking them will prevent them from interacting with your content at all.

This endpoint responds to general User parameters.

Endpoint

Method URL Token Scope
POST https://api.app.net/users/{user_id}/block User follow

URL Parameters

Name Description
user_id The id of the User to block. You can also specify @username as a user_id.

Example

to see more complete examples.

curl -X POST -H "Authorization: Bearer <YOUR ACCESS TOKEN>" -H "X-ADN-Pretty-JSON: 1" \
    "https://api.app.net/users/1558/block"
{
  "data": {
    "avatar_image": {
      "height": 200,
      "is_default": false,
      "url": "https://d2rfichhc2fb9n.cloudfront.net/image/5/aoveeP73f33UcFhyhqzn7VhwgS17InMiOiJzMyIsImIiOiJhZG4tdXNlci1hc3NldHMiLCJrIjoiYXNzZXRzL3VzZXIvOTkvYTYvNDAvOTlhNjQwMDAwMDAwMDAwMC5wbmciLCJvIjoiIn0",
      "width": 200
    },
    "canonical_url": "https://alpha.app.net/adnapi",
    "counts": {
      "followers": 1549,
      "following": 12,
      "posts": 115,
      "stars": 4
    },
    "cover_image": {
      "height": 260,
      "is_default": true,
      "url": "https://d2rfichhc2fb9n.cloudfront.net/image/5/kZ-JRmTbmd3WVPswTJ8Nwxzkf917InMiOiJzMyIsImIiOiJ0YXBwLWFzc2V0cyIsImsiOiJpL1UvaS9ZL1VpWW5xRFNvTUtyTEhLNXA0OHN2NkxmTmRVMC5qcGciLCJvIjoiIn0",
      "width": 960
    },
    "created_at": "2012-08-10T22:40:12Z",
    "description": {
      "entities": {
        "hashtags": [

        ],
        "links": [
          {
            "len": 7,
            "pos": 31,
            "text": "App.net",
            "url": "http://App.net"
          }
        ],
        "mentions": [

        ]
      },
      "html": "<span itemscope=\"https://app.net/schemas/Post\">Updating you on changes to the <a href=\"http://App.net\">App.net</a> API</span>",
      "text": "Updating you on changes to the App.net API"
    },
    "id": "1558",
    "locale": "en_US",
    "name": "ADN API",
    "timezone": "America/Los_Angeles",
    "type": "human",
    "username": "adnapi",
    "verified_domain": "developers.app.net",
    "follows_you": false,
    "you_blocked": true,
    "you_follow": false,
    "you_muted": false,
    "you_can_subscribe": true,
    "you_can_follow": true
  },
  "meta": {
    "code": 200
  }
}

Unblock a User

Allow a blocked user to interact with my content.

This endpoint responds to general User parameters.

Remember, access tokens can not be passed in a HTTP body for DELETE requests. Please refer to the authentication documentation.

Endpoint

Method URL Token Scope
DELETE https://api.app.net/users/{user_id}/block User follow

URL Parameters

Name Description
user_id The id of the User to block. You can also specify @username as a user_id.

Example

to see more complete examples.

curl -X DELETE -H "Authorization: Bearer <YOUR ACCESS TOKEN>" -H "X-ADN-Pretty-JSON: 1" \
    "https://api.app.net/users/1558/block"
{
  "data": {
    "avatar_image": {
      "height": 200,
      "is_default": false,
      "url": "https://d2rfichhc2fb9n.cloudfront.net/image/5/aoveeP73f33UcFhyhqzn7VhwgS17InMiOiJzMyIsImIiOiJhZG4tdXNlci1hc3NldHMiLCJrIjoiYXNzZXRzL3VzZXIvOTkvYTYvNDAvOTlhNjQwMDAwMDAwMDAwMC5wbmciLCJvIjoiIn0",
      "width": 200
    },
    "canonical_url": "https://alpha.app.net/adnapi",
    "counts": {
      "followers": 1549,
      "following": 12,
      "posts": 115,
      "stars": 4
    },
    "cover_image": {
      "height": 260,
      "is_default": true,
      "url": "https://d2rfichhc2fb9n.cloudfront.net/image/5/kZ-JRmTbmd3WVPswTJ8Nwxzkf917InMiOiJzMyIsImIiOiJ0YXBwLWFzc2V0cyIsImsiOiJpL1UvaS9ZL1VpWW5xRFNvTUtyTEhLNXA0OHN2NkxmTmRVMC5qcGciLCJvIjoiIn0",
      "width": 960
    },
    "created_at": "2012-08-10T22:40:12Z",
    "description": {
      "entities": {
        "hashtags": [

        ],
        "links": [
          {
            "len": 7,
            "pos": 31,
            "text": "App.net",
            "url": "http://App.net"
          }
        ],
        "mentions": [

        ]
      },
      "html": "<span itemscope=\"https://app.net/schemas/Post\">Updating you on changes to the <a href=\"http://App.net\">App.net</a> API</span>",
      "text": "Updating you on changes to the App.net API"
    },
    "id": "1558",
    "locale": "en_US",
    "name": "ADN API",
    "timezone": "America/Los_Angeles",
    "type": "human",
    "username": "adnapi",
    "verified_domain": "developers.app.net",
    "follows_you": false,
    "you_blocked": false,
    "you_follow": false,
    "you_muted": false,
    "you_can_subscribe": true,
    "you_can_follow": true
  },
  "meta": {
    "code": 200
  }
}

List blocked Users

Retrieve a list of blocked users.

This endpoint responds to general User parameters.

Endpoint

Method URL Token
GET https://api.app.net/users/{user_id}/blocked Any

URL Parameters

Name Description
user_id The id of the user to retrieve a list of muted users for. If requested with a user token you can request blocked users for the current user by using me as the user id. If requested with an app token you can request blocked users for any user that has authorized your app.

Example

to see more complete examples.

curl -H "Authorization: Bearer <YOUR ACCESS TOKEN>" -H "X-ADN-Pretty-JSON: 1" \
    "https://api.app.net/users/me/blocked"
{
  "data": [
    {
      "avatar_image": {
        "height": 200,
        "is_default": false,
        "url": "https://d2rfichhc2fb9n.cloudfront.net/image/5/aoveeP73f33UcFhyhqzn7VhwgS17InMiOiJzMyIsImIiOiJhZG4tdXNlci1hc3NldHMiLCJrIjoiYXNzZXRzL3VzZXIvOTkvYTYvNDAvOTlhNjQwMDAwMDAwMDAwMC5wbmciLCJvIjoiIn0",
        "width": 200
      },
      "canonical_url": "https://alpha.app.net/adnapi",
      "counts": {
        "followers": 1549,
        "following": 12,
        "posts": 115,
        "stars": 4
      },
      "cover_image": {
        "height": 260,
        "is_default": true,
        "url": "https://d2rfichhc2fb9n.cloudfront.net/image/5/kZ-JRmTbmd3WVPswTJ8Nwxzkf917InMiOiJzMyIsImIiOiJ0YXBwLWFzc2V0cyIsImsiOiJpL1UvaS9ZL1VpWW5xRFNvTUtyTEhLNXA0OHN2NkxmTmRVMC5qcGciLCJvIjoiIn0",
        "width": 960
      },
      "created_at": "2012-08-10T22:40:12Z",
      "description": {
        "entities": {
          "hashtags": [

          ],
          "links": [
            {
              "len": 7,
              "pos": 31,
              "text": "App.net",
              "url": "http://App.net"
            }
          ],
          "mentions": [

          ]
        },
        "html": "<span itemscope=\"https://app.net/schemas/Post\">Updating you on changes to the <a href=\"http://App.net\">App.net</a> API</span>",
        "text": "Updating you on changes to the App.net API"
      },
      "id": "1558",
      "locale": "en_US",
      "name": "ADN API",
      "timezone": "America/Los_Angeles",
      "type": "human",
      "username": "adnapi",
      "verified_domain": "developers.app.net",
      "follows_you": false,
      "you_blocked": true,
      "you_follow": false,
      "you_muted": false,
      "you_can_subscribe": true,
      "you_can_follow": true
    }
  ],
  "meta": {
    "code": 200
  }
}

Retrieve blocked User IDs for multiple Users

Returns a list of blocked User ids for each User id requested. At most 200 User ids can be requested.

Endpoint

Method URL Token
GET https://api.app.net/users/blocked/ids App

Query String Parameters

Name Description
ids A comma separated list of User ids to retrieve blocked User ids for.

Example

to see more complete examples.

curl -H "Authorization: Bearer <YOUR APP TOKEN>" -H "X-ADN-Pretty-JSON: 1" \
    "https://api.app.net/users/blocked/ids?ids=1,2"
{
  "data": {
    "1": [
      "3",
      "29"
    ],
    "2": [

    ]
  },
  "meta": {
    "code": 200
  }
}