# ユーザー名からのユーザー取得

`GET /api/user/by-name/{name}`

URL: https://repsona.com/ja/api/get-user-by-name-name

ユーザー名でユーザーのプロフィールを取得します。他のスペースのユーザーは見つかりません。

## パラメーター

| name | in | type | required | description |
| --- | --- | --- | --- | --- |
| `name` | path | string | 必須 | ユーザー名 (@name) です。@ は付けません。 |

## リクエスト

```sh
curl -X GET "https://<space>.repsona.com/api/user/by-name/{name}" \
  -H "Authorization: Bearer $REPSONA_API_KEY"
```

## レスポンス

- 200: User profile
- 401: Authentication is required
- 404: User not found in this space

## レスポンスの例

```json
{
  "user": {
    "id": 1128,
    "name": "mia",
    "fullName": "Mia Chen",
    "avatarUrl": null,
    "color": null,
    "backgroundUrl": null,
    "role": "member",
    "whatAreYouDoing": "Testing the mobile app",
    "state": "active"
  }
}
```
