octokit.rest

List users blocked by the authenticated user

List the users you've blocked on your personal account.

giant-sentry-fist Preview (required)

The API to block users is currently available for developers to preview. See the preview notice for more information.

To access the API during the preview period, you must provide a custom media type in the Accept header:

application/vnd.github.giant-sentry-fist-preview+json

Parameters

string The token will be passed in the authorization header.

Request

GET https://api.github.com/user/blocks
authorization: bearer undefined
accept: application/vnd.github.v3+json
user-agent: octokit.rest


Example Response

Status: 200
[
  {
    "login": "octocat",
    "id": 1,
    "node_id": "MDQ6VXNlcjE=",
    "avatar_url": "https://github.com/images/error/octocat_happy.gif",
    "gravatar_id": "",
    "url": "https://api.github.com/users/octocat",
    "html_url": "https://github.com/octocat",
    "followers_url": "https://api.github.com/users/octocat/followers",
    "following_url": "https://api.github.com/users/octocat/following{/other_user}",
    "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
    "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
    "subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
    "organizations_url": "https://api.github.com/users/octocat/orgs",
    "repos_url": "https://api.github.com/users/octocat/repos",
    "events_url": "https://api.github.com/users/octocat/events{/privacy}",
    "received_events_url": "https://api.github.com/users/octocat/received_events",
    "type": "User",
    "site_admin": false
  }
]

See documentation on GitHub developer guides