# Get an account

`GET /api/v1/accounts/{name}`

Authentication: no security requirement declared for this operation.

Parameters:

- `name` (path, string, required) - The username or handle of the account
  Type: string
  
  Example:
  
  ```json
  "chocobozzz | chocobozzz@example.org"
  ```

Responses:

- 200: successful operation

Content type: application/json

Type: Actor & any

Schema: [Account](https://sourcey-peertube.pages.dev/api-rest-reference/models/account.md)

allOf:
  Reference: [Actor](https://sourcey-peertube.pages.dev/api-rest-reference/models/actor.md); Type: Actor

  Type: any
  
  - `userId` (optional)
    Type: id; nullable
    
    object id for the user tied to this account
    
    allOf:
      Reference: [id](https://sourcey-peertube.pages.dev/api-rest-reference/models/id.md); Type: id
      
      minimum: 1
      
      Example:
      
      ```json
      42
      ```
  
  - `displayName` (optional)
    Type: string
    
    editable name of the account, displayed in its representations
    
    minLength: 3
    
    maxLength: 120
  
  - `description` (optional)
    Type: string; nullable
    
    text or bio displayed on the account's profile

- 404: account not found

## Examples

### cURL

```bash
curl -X GET 'https://peertube2.cpy.re/api/v1/accounts/chocobozzz%20%7C%20chocobozzz%40example.org'
```

### JavaScript

```javascript
const response = await fetch('https://peertube2.cpy.re/api/v1/accounts/chocobozzz%20%7C%20chocobozzz%40example.org', {
  method: 'GET',
});

const data = await response.text();
```

### Python

```python
import requests

response = requests.get('https://peertube2.cpy.re/api/v1/accounts/chocobozzz%20%7C%20chocobozzz%40example.org')
print(response.text)
```
