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

# User Profile 用の refId の取得方法 | Ayrshare Docs

> Ayrshare で User Profile の refId を検索・取得する方法、その用途、および refId を使って複数の接続アカウントを管理する方法を解説します。

このページでは、User Profile の `refId` を取得する方法を説明します。

## 背景

[User Profile 作成](/apis/profiles/create-profile) 時に、レスポンスで次の 4 つのフィールドが返されます:

```json theme={"system"}
{
    "status": "success",
    "title": "Digg It",
    "refId": "140b8709bd6ade099b242d895e268fb886130c53",
    "profileKey": "7TVRLEZ-24A43C0-NJW0Z82-F11984N"
}
```

`refId` と `profileKey` の両方は、システム内で安全に保管することが重要です。`profileKey` は特定の User Profile に対して API リクエストを行うために使用され、`refId` は Ayrshare が API 呼び出し中にその User Profile を識別する方法です。

## refId の取得

User Profile の `refId` を取得する方法はいくつかあります。

1. [Get User Profiles](/apis/profiles/get-profiles) エンドポイントを使用して、Primary Profile に関連付けられたすべての User Profiles を取得します。返される各プロファイルをフィルタリングして、User Profile 作成時に指定した title に対応する `refId` を見つけます。(注: このエンドポイントからは各 User Profile の `profileKey` は返されないため、既存の `profileKey` に対して `refId` を関連付けることはできません)。

2. Ayrshare ダッシュボードの User Profiles ページに移動します。関連する User Profile をスクロールまたは検索します。ここで User Profile の `refId` を確認できます。

<img src="https://mintcdn.com/ayrshare/xrGl9DrFFYfXkVdh/images/help-center/technical-support/refId_retrieval.webp?fit=max&auto=format&n=xrGl9DrFFYfXkVdh&q=85&s=e4de1b4192ae9ec38b739e8dd938f23a" alt="retrieve refId" class="center" width="3856" height="2676" data-path="images/help-center/technical-support/refId_retrieval.webp" />
