> For the complete documentation index, see [llms.txt](https://agpt.co/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://agpt.co/docs/integrations/block-integrations/users.md).

# GitHub Users

A block for looking up a GitHub user's public profile, or the profile of the account the supplied credentials belong to.

## Github Get User Info

### What it is

This block fetches information about a GitHub user, or about the authenticated user (yourself) if no username is given.

### How it works

Calls `/users/{username}` when a username is given, and the authenticated-user endpoint `/user` when it is left empty — which is how one block answers both "who is this person" and "who am I". The commonly used fields are pulled out as discrete outputs, and the untouched response is emitted as `user` as well, because GitHub returns roughly forty fields and which ones matter depends on the caller. The two endpoints do not return the same object: for the authenticated user the payload additionally carries private account details such as plan, email and private repository counts, so route `user` with that in mind.

### Inputs

| Input    | Description                                                                                   | Type | Required |
| -------- | --------------------------------------------------------------------------------------------- | ---- | -------- |
| username | Username of the GitHub user to look up. Leave empty to get the authenticated user (yourself). | str  | No       |

### Outputs

| Output       | Description                                                                                                                                                                                  | Type            |
| ------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------- |
| error        | Error message if fetching the user info failed                                                                                                                                               | str             |
| username     | Login (username) of the user                                                                                                                                                                 | str             |
| name         | Display name of the user                                                                                                                                                                     | str             |
| profile\_url | URL of the user's GitHub profile                                                                                                                                                             | str             |
| avatar\_url  | URL of the user's avatar image                                                                                                                                                               | str             |
| user         | The full user object from the API. For the authenticated user (i.e. when no username is given) this also includes private account details such as plan, email and private repository counts. | Dict\[str, Any] |

### Possible use case

A graph resolves the operating account once at the start of a run — no username, so it hits `/user` — and reuses the returned login to filter issues, pull requests and review requests to that person's own, instead of hardcoding a username into every downstream block.

***


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://agpt.co/docs/integrations/block-integrations/users.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
