# Get Connection Status and Connection Counter

### Connection Status

Before following other users, it is important to verify the connection status of the target user. Our SDK provides three statuses to indicate the connection status of the target user:

* `accept`: This status means that the target user has already connected.
* `pending`: This status means that the target user has received a follow request, but has not yet accepted it. This status is only available when the connection method setting is [With the request process](/social-plus-sdk/social/follow-unfollow.md#user-connection-method-concept).
* `none`: This status means that the target user has not yet connected.
* `blocked`: This status means that the target user has been blocked by the current user. For further information regarding blocked/unblocked users, please visit [Block and Unblock User](/social-plus-sdk/social/block-and-unblock-user.md).

### Connection Counter

In addition to these statuses, our SDK also provides information about the following and follower count of the target user:

* `followingCount`: This is the total number of users that the target user is following.
* `followerCount`: This is the total number of users who are following the target user.
* `pendingCount`: This is the total number of follow-up requests that the target user has received.

By providing this information, our product allows users to manage their social connections effectively and efficiently, based on their specific needs and preferences.

{% tabs %}
{% tab title="iOS" %}
The following feature functionalities are packed in `AmityUserRepository` and can be called via `userRelationship`.

{% embed url="<https://gist.github.com/amythee/422534e6327d3b36c9e37724b38e56fd>" %}

To get the current user to follow information, use `getMyFollowInfo`.

{% embed url="<https://gist.github.com/amythee/7f43f0dcd58c86ca11304ab7658a3b75>" %}

To get the other's user follow information, use `getFollowInfo` with the `userId` parameter.

{% embed url="<https://gist.github.com/amythee/9db0bc9fc7221c63efee0ac0c5f15c44>" %}
{% endtab %}

{% tab title="Android" %}
To get the current user follow information, use the code below.

{% embed url="<https://gist.github.com/amythee/c292366d9e2f1027b1fc4f937893f170#file-amityfollowselfget-kt>" %}

To get the other's user follow information, use the code below with the `userId` parameter.

{% embed url="<https://gist.github.com/amythee/53f8680397c5a10d7c53b904a0886b46#file-amityfollowuserget-kt>" %}
{% endtab %}

{% tab title="JavaScript" %}
{% embed url="<https://gist.github.com/amythee/82c55218e3d99f65d2498ede458e038b#file-followinfo-js>" %}
{% endtab %}

{% tab title="TypeScript" %}
{% embed url="<https://gist.github.com/ae639a96eca9822ca8f90e1ba31adbd1>" %}
{% endtab %}

{% tab title="Flutter" %}
To get the current user follow information, use the code below.

{% embed url="<https://gist.github.com/amythee/52225809dae070188a0278c8bee9969c#file-amitymyfollowcount-dart>" %}

To get the other's user follow information, use the code below with the `userId` parameter.

{% embed url="<https://gist.github.com/amythee/52d2994dcef26ef71fd3e5827b601dd1#file-amityotherfollowinfo-dart>" %}
{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.social.plus/social-plus-sdk/social/follow-unfollow/get-connection-status-and-connection-counter.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
