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

# User Profile Details

> Get linked social accounts, usernames, account status, and usage metrics for the user or a User Profile, including response caching and monthly post quota.

This endpoint retrieves detailed information about the authenticated user or user profile, including:

<ul>
  <li>A comprehensive list of all linked social media accounts</li>
  <li>Social media usernames and profile information</li>
  <li>Account status and usage metrics</li>
</ul>

The returned data reflects the state of connected social networks as of the last refresh, and updates whenever users connect or disconnect their social media accounts.

> [!NOTE]
>
> **Response caching.** Responses are cached for up to **60 seconds**. The `lastUpdated` and `nextUpdate` fields describe that cache window: `lastUpdated` is when the snapshot was built, `nextUpdate` is when it expires.
>
> `nextUpdate` is a **cache-expiry marker, not a readiness signal.** It is stamped on every response, including one whose `displayNames` does not yet list an account you were just notified about, so it cannot tell you when a newly linked account has finished propagating.
>
> If you are reconciling a [`social` webhook](https://www.ayrshare.com/docs/apis/webhooks/actions) for a brand-new link, poll until the account you expect actually appears in `displayNames` — do not treat a single response, or the arrival of `nextUpdate`, as confirmation that the link is absent or complete.

> [!NOTE]
>
> **Threads `username` vs `displayName`.** In a Threads `displayNames` entry, `username` is the account handle (for example `ayrshare`). `displayName` is the name shown on the profile (for example `Ayrshare`). They can be different, so use `username` or `profileUrl` to find the Threads account.

> [!NOTE]
>
> **Instagram `id` vs `userId`.** In an Instagram `displayNames` entry, `id` is the Instagram professional account ID. It is the same value as `recipientId` on incoming messages and `senderId` on outgoing messages in [messaging webhooks](https://www.ayrshare.com/docs/apis/webhooks/actions.md#messages-action). `userId` is the Facebook user ID of the person who connected the account. It is only returned for Instagram accounts connected through Facebook Login.

If no social accounts are linked, `activeSocialAccounts` will not be returned.

Get data for a particular User Profile by adding the [Profile-Key in the header](https://www.ayrshare.com/docs/apis/overview.md#profile-key-format).

> [!WARNING]
>
> <ul>
>   <li>If your business requires gathering all of your user profile data at once, please use the [/user/batch endpoint](https://www.ayrshare.com/docs/apis/user/batch-all-users.md).</li>
>   <li>If you need a notification when a user links and unlinks a social account, please see the [/webhooks endpoint](https://www.ayrshare.com/docs/apis/webhooks/overview.md).</li>
> </ul>

## Header Parameters

**Authorization** `string` *required*

[API Key](https://www.ayrshare.com/docs/apis/overview.md#authorization) of the Primary Profile.

Format: `Authorization: Bearer API_KEY`
**Profile-Key** `string`

[Profile Key](https://www.ayrshare.com/docs/apis/overview.md#profile-key-format) of a User Profile.

Format: `Profile-Key: PROFILE_KEY`

## Query Parameters

**instagramDetails** `boolean` (default: false)

Returns additional Instagram details such as account type (business or creator) and used quota.
Not recommended unless you need the additional data since it will slow down the response time.

## Monthly Post Quota

The response shows how much of the profile's monthly post quota is used:

* `monthlyPostCount`: posts counted against the quota this month.
* `monthlyPostQuota`: the monthly limit. It is omitted when the quota is 10,000 or more, for example on Business plans. The limit still applies.

The count resets on the 1st of each month at 00:07 UTC, not on your billing date. Failed post attempts count too. `monthlyApiCalls` is a different counter and is not the post quota. See [How Many Posts & API Calls Can I Make?](https://www.ayrshare.com/docs/help-center/product/how-many-posts-and-api-calls-can-i-make.md) for what counts and what happens when you run out.

```bash cURL theme={"system"}
curl \
-H "Authorization: Bearer API_KEY" \
-X GET https://api.ayrshare.com/api/user
```

```javascript JavaScript theme={"system"}
const API_KEY = "API_KEY";

fetch("https://api.ayrshare.com/api/user", {
      method: "GET",
      headers: {
        "Authorization": `Bearer ${API_KEY}`
      }
    })
      .then((res) => res.json())
      .then((json) => console.log(json))
      .catch(console.error);
```

```python Python theme={"system"}
import requests

headers = {'Authorization': 'Bearer API_KEY'}
r = requests.get('https://api.ayrshare.com/api/user', headers=headers)

print(r.json())
```

```php PHP theme={"system"}
$apiUrl = 'https://api.ayrshare.com/api/user';
$apiKey = 'API_KEY';  // Replace 'API_KEY' with your actual API key

$headers = [
    'Content-Type: application/json',
    'Authorization: Bearer ' . $apiKey,
];

$curl = curl_init($apiUrl);
curl_setopt_array($curl, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => $headers
]);

$response = curl_exec($curl);

if ($response === false) {
    echo 'Curl error: ' . curl_error($curl);
} else {
    echo json_encode(json_decode($response), JSON_PRETTY_PRINT);
}

curl_close($curl);
```

```csharp C# theme={"system"}
using System;
using System.Net.Http;
using System.Threading.Tasks;

namespace UserGETRequest_csharp
{
class User
{
    static async Task Main(string[] args)
    {
        string API_KEY = "API_KEY";
        string url = "https://api.ayrshare.com/api/user";

        using (var client = new HttpClient())
        {
            client.DefaultRequestHeaders.Add("Authorization", "Bearer " + API_KEY);
            
            try
            {
                HttpResponseMessage response = await client.GetAsync(url);
                response.EnsureSuccessStatusCode();
                string responseBody = await response.Content.ReadAsStringAsync();
                Console.WriteLine(responseBody);
            }
            catch (HttpRequestException e)
            {
                Console.WriteLine($"Error: {e.Message}");
            }
        }
    }
}
}
```

```javascript 200: Response theme={"system"}
{
    "activeSocialAccounts": [
        "bluesky",
        "facebook",
        "gmb",
        "instagram",
        "linkedin",
        "pinterest",
        "reddit",
        "snapchat",
        "telegram",
        "threads",
        "tiktok",
        "twitter",
        "youtube"
    ],
    "created": {
        "_seconds": 1667351022,
        "_nanoseconds": 814000000,
        "utc": "2022-11-02T01:03:42Z"
    },
    "displayNames": [
        { // Bluesky
            "created": "2025-01-06T21:30:19.756Z",
            "description": "Ayrshare's Social APIs provide the core infrastructure for social media posting, management, and analytics.",
            "displayName": "Ayrshare",
            "id": "did:plc:62musrcyanhro2lydyhl", // Bluesky Id
            "platform": "bluesky",
            "userImage": "https://cdn.bsky.app/img/avatar/plain/did:plc:62musrcyanhro2lydyhlw7ci/bafkreie",
            "username": "ayrshare.com"
        },
        { // Facebook
            "created": "2022-11-14T16:18:49.110Z",
            "displayName": "Ayrshare",
            "id": "106638148652329",    // Facebook Page Id
            "messagingActive": true,    // Messaging active for the social network
            "pageName": "Ayrshare",
            "platform": "facebook",
            "profileUrl": "https://www.facebook.com/ayrshare",
            "userId": "283748192833",   // Facebook User Id
            "userImage": "https://img.ayrshare.com/ndfdfJ239s/social/facebook.jpeg"    // The image at the time of linking
        },
        { // Google Business Profile
            "created": "2024-03-27T20:47:46.251Z",
            "description": "Easy to integrate Social Media APIs allow you to manage all your users' social accounts right from your product. Post, Auto Schedule, and Analytics. Great for SaaS, CMS, DAM, Agencies, and Apps.",
            "displayName": "Ayrshare",
            "mapsUrl": "https://maps.google.com/maps?cid=5229466225881728772",
            "placeId": "ChIJN53jw8BZwokRBEeVVtPLkkg",
            "platform": "gmb",
            "profileUrl": "https://www.ayrshare.com/",
            "reviewUrl": "https://search.google.com/local/writereview?placeid=ChIJN53jw8BZwokRBEeVVtPLkkg"
        },
        { // Instagram
            "created": "2022-11-09T20:36:58.659Z",
            "displayName": "Ayrshare",
            "id": "17841401430400299",  // Instagram professional account ID. Same value as recipientId (incoming) and senderId (outgoing) in messaging webhooks
            "messagingActive": true,    // Messaging active for the social network
            "pageName": "Social Media API", // Linked Facebook Page name. Only returned for Instagram connected through Facebook Login
            "platform": "instagram",
            "profileUrl": "https://www.instagram.com/ayrshare",
            "userId": "283748192833",   // Facebook user ID. Only returned for Instagram connected through Facebook Login
            "userImage": "https://img.ayrshare.com/ndfdfJ239s/social/instagram.jpeg", // The image at the time of linking
            "username": "ayrshare",

            // Additional Instagram details with instagramDetails=true
            "type": "business", // business or creator. Creator accounts can also return business
            "usedQuota": 20     // Posts used in the rolling 24-hour period. Instagram allows 50. Returns 0 if the lookup fails, sometimes with an error field
        },
        { // LinkedIn
            "created": "2022-11-17T18:52:29.830Z",
            "displayName": "Ayrshare",
            "id": "72157",
            "platform": "linkedin",
            "profileUrl": "https://www.linkedin.com/company/ayrshare",
            "refreshDaysRemaining": 364,    // Days until link auth must be refreshed
            "refreshRequired": "2023-11-17T18:52:29.830Z", // Date and time when link auth must be refreshed
            "type": "corporate",            // corporate or personal
            "userImage": "https://img.ayrshare.com/ndfdfJ239s/social/linkedin.jpeg", // The image at the time of linking
            "username": "ayrshare" // logged in username
        },
        { // Pinterest
            "created": "2022-12-06T03:16:52.642Z",
            "displayName": "Ayrshare",
            "id": "42995790741",
            "platform": "pinterest",
            "profileUrl": "https://www.pinterest.com/ayrshare",
            "userImage": "https://img.ayrshare.com/ndfdfJ239s/social/pinterest.jpeg", // The image at the time of linking
            "username": "ayrshare"
        },
        { // Reddit
            "created": "2022-11-17T18:55:34.419Z",
            "displayName": "funone",
            "platform": "reddit",
            "profileUrl": "https://www.reddit.com/user/funone",
            "userImage": "https://img.ayrshare.com/ndfdfJ239s/social/reddit.png", // The image at the time of linking
            "username": "funone"
        },
        { // Snapchat
            "created": "2025-05-19T19:23:40.925Z",
            "displayName": "ayrshare",
            "id": "43548e97-edf1-44f9-984a-0a384703333",
            "platform": "snapchat",
            "profileUrl": "https://www.snapchat.com/add/username",
            "userImage": "https://img.ayrshare.com/EuMQpMIgcPZYuwHnWeVBCXyftb52/social/snapchat",
            "username": "ayrshare"
        },
        { // Telegram
            "created": "2022-11-17T18:55:16.320Z",
            "displayName": "Ayrshare",
            "id": -10017122,
            "platform": "telegram",
            "profileUrl": "https://web.telegram.org/z/#-17122",
            "type": "channel",
            "userImage": "https://img.ayrshare.com/nclMLxaIzmXHxOi4KEggA5gQ1T82/social/telegram.octo-stream" // The image at the time of linking
        },
        { // Threads
            "created": "2025-04-24T20:26:28.311Z",
            "displayName": "Ayrshare",
            "id": "9273292656113202",
            "isEligibleForGeoRestrictions": false,
            "isVerified": false,
            "platform": "threads",
            "profileUrl": "https://www.threads.com/@ayrshare",
            "userImage": "https://scontent-dfw5-2.cdninstagram.com/v/t51.2885-15/357665262", // The image at the time of linking
            "username": "ayrshare"
        },
        { // TikTok
            "created": "2022-11-02T02:11:53.452Z",
            "displayName": "Ayrshare",
            "id": "5ebc6f39-7900-421e-bf9",
            "platform": "tiktok",
            "profileUrl": "https://www.tiktok.com/@ayrshare",
            "refreshDaysRemaining": 234, // Days until link auth must be refreshed
            "refreshRequired": "2026-04-24T15:25:32.344Z", // Date and time when link auth must be refreshed
            "userImage": "https://img.ayrshare.com/ndfdfJ239s/social/tiktok.jpeg", // The image at the time of linking
            "username": "@ayrshare"
        },
        { // Twitter
            "created": "2022-11-02T01:38:42.326Z",
            "displayName": "ayrshare",
            "id": "1194881472",
            "messagingActive": true,
            "platform": "twitter", // Messaging active for the social network
            "profileUrl": "https://twitter.com/ayrshare",
            "subscriptionType": "Premium", // Premium, PremiumPlus, None
            "userImage": "https://img.ayrshare.com/ndfdfJ239s/social/twitter.png", // The image at the time of linking
            "username": "ayrshare",
            "verifiedType": "blue" // Values "blue", "business", or "none". Both "blue" and "business" are considered Premium. This will be updated when an X post is done via Ayrshare.
        },
        { // YouTube
            "channelId": "UCcMBjBksQnhCn5NNLtGKphw", // YouTube channel ID (starts with "UC") — different from "id" below
            "channelTitle": "Ayrshare", // The channel's actual title
            "created": "2022-11-17T18:54:09.954Z",
            "displayName": "Kenneth Chen", // The connected Google account holder's name — NOT the channel title
            "handle": "@ayrshare", // The @handle — omitted when the channel has no custom URL
            "id": "106891058521430758565", // Google account ID — different from "channelId"
            "platform": "youtube",
            "profileUrl": "https://www.youtube.com/@ayrshare", // Falls back to https://www.youtube.com/channel/<channelId> when the channel has no custom URL
            "userImage": "https://img.ayrshare.com/ndfdfJ239s/social/youtube.png", // The image at the time of linking
            "username": "Kenneth Chen" // The connected Google account holder's name — NOT the channel title
        }
    ],
    "email": "me@ayrshare.com",    // null if a User Profile
    "lastApiCall": "2024-08-14T15:18:11Z",  // Time of the last recorded API call for this user
    "messagingConversationMonthlyCount": 7, // Monthly conversation count out of 1,000 - contact us if you need more per user profile
    "messagingEnabled": true,      // Messaging enabled for the account
    "monthlyApiCalls": 120,        // API calls of all types this month. Not the post quota.
    "monthlyPostCount": 49,        // Posts counted against the monthly quota. Resets on the 1st (UTC).
    "monthlyPostQuota": 500,       // Quota of monthly API post calls. Omitted when the quota is 10,000 or more.
    "refId": "13a9da9e0df1183a7a6a1fc2c60b8023fa9a32a0",    // User Profile reference ID
    "title": "Primary Profile",    // User Profile Title - Business Plan only
    "lastUpdated": "2024-01-04T15:51:17.775Z", // When this cached snapshot was built
    "nextUpdate": "2024-01-04T15:52:17.775Z"   // When the cache expires. Not a readiness signal — see Response caching above
}
```

```json 403: Profile Key Not Found theme={"system"}
{
  "action": "post",
  "status": "error",
  "code": 144,
  "message": "Some profiles not found. Please verify the Profile Keys."
}
```


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