> ## Documentation Index
> Fetch the complete documentation index at: https://gowa-docs.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# ユーザーのアバター



## OpenAPI

````yaml /ja/openapi.yml get /user/avatar
openapi: 3.0.0
info:
  title: WhatsApp API マルチデバイス
  version: 9.7.0
  description: |
    この API は API 経由で whatsapp を送信するために使用されます。

    Web ダッシュボードは別のプロジェクトです (gowa-ui); サーバーは
    最新のリリースアセットをダウンロードし、`/`で動作します（または、
    APP_UI_ENABLED=falseの場合はJSONバナーを返します）。

    デバイススコープ:
    - すべてのデバイススコープの REST コールで `X-Device-Id` を送信します。
    - WebSocket: `/wsに接続しますか？device_id=<id> ` 。
    - WebSocket 認証（Basic Auth が有効な場合）: ブラウザーは WebSocket 接続で
      Authorization ヘッダーを設定できないため、クエリ文字列にも
      `&authorization=<base64(user:pass)>` を渡してください。 認証情報が URL に表示されるため、本番環境では
      TLS を使用してください。
servers:
  - url: http://localhost:3000
security:
  - basicAuth: []
tags:
  - name: app
    description: Whatsappサーバーへの初期接続
  - name: device
    description: マルチデバイスサポートのためのデバイス管理
  - name: user
    description: 情報の取得
  - name: send
    description: メッセージ (テキスト/イメージ/ファイル/ビデオ) を送信します。
  - name: message
    description: メッセージ操作 (revoke/react/update)
  - name: call
    description: 通話管理 (着信拒否)
  - name: chat
    description: チャットとメッセージ
  - name: group
    description: グループ設定
  - name: newsletter
    description: ニュースレターの設定
  - name: chatwoot
    description: カスタマーサポートのためのChatwoot統合
paths:
  /user/avatar:
    get:
      tags:
        - user
      summary: ユーザーのアバター
      operationId: userAvatar
      parameters:
        - $ref: '#/components/parameters/DeviceIdHeader'
        - name: phone
          in: query
          schema:
            type: string
          example: 6289685028129@s.whatsapp.net
          description: 国コードのある電話番号
        - name: is_preview
          in: query
          schema:
            type: boolean
          example: true
          description: アバターのプレビューを取得するかどうか
        - name: is_community
          in: query
          schema:
            type: boolean
          example: false
          description: コミュニティアバターを取得するか
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserAvatarResponse'
        '400':
          description: 不正なリクエスト
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorBadRequest'
        '403':
          description: 'AVATAR_HIDDEN: 連絡先がこのアカウントから画像を非表示にします（連絡先が存在するかどうかについては何も言いません）'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorForbidden'
              example:
                code: AVATAR_HIDDEN
                message: the user has hidden their profile picture from you
        '404':
          description: >-
            連絡先にプロフィール画像(AVATAR_NOT_SET)がないか、デバイスが不明です (DEVICE_NOT_FOUND)。
            状態だけでなく、`code`をチェックしてください。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorNotFound'
              examples:
                avatarNotSet:
                  summary: 連絡先にプロフィール画像がありません
                  value:
                    code: AVATAR_NOT_SET
                    message: that user or group does not have a profile picture
                deviceNotFound:
                  summary: 不明なデバイス
                  value:
                    code: DEVICE_NOT_FOUND
                    message: >-
                      device not found; create a device first from /api/devices
                      or provide a valid X-Device-Id
                    results:
                      device_id: my-device
        '500':
          description: 内部サーバーエラー
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorInternalServer'
components:
  parameters:
    DeviceIdHeader:
      name: X-Device-Id
      in: header
      required: false
      description: |
        マルチデバイスサポート用のデバイス識別子 複数のデバイスが登録されている場合に必要です。
        1つのデバイスのみ登録されている場合は、デフォルトとして使用されます。
        `device_id`クエリパラメータとして提供することもできます。
      schema:
        type: string
        example: my-device-id
  schemas:
    UserAvatarResponse:
      type: object
      properties:
        code:
          type: string
          example: SUCCESS
        message:
          type: string
          example: Success
        results:
          type: object
          properties:
            url:
              type: string
              example: >-
                https://pps.whatsapp.net/v/t61.24694-24/181358562_385581386633509_6230178822944778044_n.jpg?ccb=11-4&oh=df36c5b990497b8a5758a0f1ad8118a8&oe=620AA726
            id:
              type: string
              example: '1635239861'
            type:
              type: string
              example: image
    ErrorBadRequest:
      type: object
      properties:
        code:
          type: string
          example: 400
          description: HTTP ステータスコードです
        message:
          type: string
          example: field cannot be blank
          description: 詳細エラーメッセージ
        results:
          type: object
          example: null
          description: 追加データ
    ErrorForbidden:
      type: object
      properties:
        code:
          type: string
          example: AVATAR_HIDDEN
          description: システムのコードにエラー
        message:
          type: string
          example: the user has hidden their profile picture from you
          description: 詳細エラーメッセージ
        results:
          type: object
          description: 追加データ
    ErrorNotFound:
      type: object
      properties:
        code:
          type: string
          example: 404
          description: HTTP ステータスコードです
        message:
          type: string
          example: Chat not found
          description: 詳細エラーメッセージ
        results:
          type: object
          example: null
          description: 追加データ
    ErrorInternalServer:
      type: object
      properties:
        code:
          type: string
          example: INTERNAL_SERVER_ERROR
          description: システムのコードにエラー
        message:
          type: string
          example: you are not loggin
          description: 詳細エラーメッセージ
        results:
          type: object
          example: null
          description: 追加データ
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic

````

## Related topics

- [ユーザーのアバター変更](https://gowa-docs.mintlify.site/ja/api-reference/user/ユーザーのアバター変更.md)
- [ユーザーのプライバシー設定](https://gowa-docs.mintlify.site/ja/api-reference/user/ユーザーのプライバシー設定.md)
- [ユーザーの連絡先のリストを取得する](https://gowa-docs.mintlify.site/ja/api-reference/user/ユーザーの連絡先のリストを取得する.md)
- [ユーザー情報](https://gowa-docs.mintlify.site/ja/api-reference/user/ユーザー情報.md)
- [ユーザー変更のプッシュ名](https://gowa-docs.mintlify.site/ja/api-reference/user/ユーザー変更のプッシュ名.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.