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

# Get Connection Status

> Read follow status and follow counts for the current user or another user.

Use follow info APIs to render profile headers, follow buttons, follower counts, following counts, and pending-request badges.

The current user's follow info returns counts only. Another user's follow info returns counts plus the current user's relationship status toward that user.

| Field | TypeScript | iOS | Android | Flutter |
| - | - | - | - | - |
| Follower count | `followerCount` | `followersCount` | `getFollowerCount()` | `followerCount` |
| Following count | `followingCount` | `followingCount` | `getFollowingCount()` | `followingCount` |
| Pending count for current user | `pendingCount` | `pendingCount` | `getPendingRequestCount()` | `pendingRequestCount` |
| Status for another user | `status` | `status` | `getStatus()` | `status` |

## Parameters

| Operation | Parameter | Required | Description |
| - | - | - | - |
| Get my follow info | None | No | Reads the current user's follow counts and pending-request count. |
| Get another user's follow info | `userId` / `targetUserId` | Yes | ID of the user whose counts and relationship status should be read. |
| Live observation | Callback / observer / subscription | Platform-dependent | TypeScript, iOS, and Android examples observe live data. Retain and dispose the returned handle where applicable. |

## Get My Follow Info

Read the current user's follow counts and pending-request count for profile or account surfaces.

```swift iOS theme={null}
let relationship = AmityUserRelationship()

_ = relationship.getMyFollowInfo().observe { liveObject, error in
    if let error {
        handleError(error)
        return
    }

    if let info = liveObject.snapshot {
        _ = info.followersCount
        _ = info.followingCount
        _ = info.pendingCount
    }
}
```

```kotlin Android theme={null}
val disposable = AmityCoreClient.newUserRepository()
    .relationship()
    .getMyFollowInfo()
    .subscribe(
        { info: AmityMyFollowInfo ->
            showSuccessMessage(info.getFollowerCount())
        },
        { error ->
            handleGeneralError(error)
        },
    )
```

```typescript TypeScript theme={null}
import { UserRepository } from '@amityco/ts-sdk';

const unsubscribe = UserRepository.Relationship.getMyFollowInfo(
  ({ data: followInfo, loading, error }) => {
    if (error) {
      handleError(error);
      return;
    }

    if (!loading && followInfo) {
      updateUI({
        followers: followInfo.followerCount,
        following: followInfo.followingCount,
        pending: followInfo.pendingCount,
      });
    }
  },
);
```

```dart Flutter theme={null}
final info = await AmityCoreClient.newUserRepository()
    .relationship()
    .getMyFollowInfo();

final followerCount = info.followerCount;
final followingCount = info.followingCount;
final pendingCount = info.pendingRequestCount;
```

## Get Another User's Follow Info

Read another user's follow info when rendering a profile header or follow button state.

```swift iOS theme={null}
let relationship = AmityUserRelationship()

_ = relationship.getFollowInfo(withUserId: "target-user-id").observe { liveObject, error in
    if let error {
        handleError(error)
        return
    }

    if let info = liveObject.snapshot {
        _ = info.status
        _ = info.followersCount
        _ = info.followingCount
    }
}
```

```kotlin Android theme={null}
val disposable = AmityCoreClient.newUserRepository()
    .relationship()
    .getFollowInfo(userId = targetUserId)
    .subscribe(
        { info: AmityUserFollowInfo ->
            showSuccessMessage(info.getStatus().apiKey)
        },
        { error ->
            handleGeneralError(error)
        },
    )
```

```typescript TypeScript theme={null}
import { UserRepository } from '@amityco/ts-sdk';

const unsubscribe = UserRepository.Relationship.getFollowInfo(
  userId,
  ({ data: followInfo, loading, error }) => {
    if (error) {
      handleError(error);
      return;
    }

    if (!loading && followInfo) {
      updateUI({
        status: followInfo.status,
        followers: followInfo.followerCount,
        following: followInfo.followingCount,
      });
    }
  },
);
```

```dart Flutter theme={null}
final info = await AmityCoreClient.newUserRepository()
    .relationship()
    .getFollowInfo(targetUserId);

final status = info.status;
final followerCount = info.followerCount;
final followingCount = info.followingCount;
```

## Related Topics

> **[Follow/Unfollow User](/social-plus-sdk/social/user-relationship/following/follow-unfollow-user.md)**
>
> Change the relationship state.

> **[Accept/Decline Requests](/social-plus-sdk/social/user-relationship/following/accept-decline-follow-request.md)**
>
> Process pending requests.

> **[Follower Lists](/social-plus-sdk/social/user-relationship/following/get-follower-following-list.md)**
>
> Query follower and following lists.


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