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

# Accept/Decline Follow Request

> Accept or decline incoming follow requests with the social.plus SDKs.

When follow approval is enabled, a follow call creates a pending request. The target user can accept the request to make the relationship active, or decline it to remove the request.

<Info>
  Accept and decline methods operate on requests received by the current user. If the request has already been withdrawn, accepted, or declined, handle the SDK error and refresh the request list or follow info.
</Info>

## Parameters

| Operation              | Parameter                 | Required | Description                                                           |
| ---------------------- | ------------------------- | -------- | --------------------------------------------------------------------- |
| Accept follow request  | `userId` / `targetUserId` | Yes      | ID of the requester whose incoming follow request should be accepted. |
| Decline follow request | `userId` / `targetUserId` | Yes      | ID of the requester whose incoming follow request should be declined. |

## Accept Follow Request

Accept an incoming follow request when the current user approves the requester.

<CodeGroup>
  ```swift iOS theme={null}
  let relationship = AmityUserRelationship()
  let response = try await relationship.acceptMyFollower(withUserId: "requester-user-id")
  _ = response
  ```

  ```kotlin Android theme={null}
  val disposable = AmityCoreClient.newUserRepository()
      .relationship()
      .acceptMyFollower(userId = targetUserId)
      .subscribe(
          {
              showSuccessMessage()
          },
          { error ->
              handleGeneralError(error)
          },
      )
  ```

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

  const didAccept = await UserRepository.Relationship.acceptMyFollower(userId);

  if (didAccept) {
    showSuccessMessage('Follow request accepted');
  }
  ```

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

  final statusValue = status.value;
  ```
</CodeGroup>

## Decline Follow Request

Decline an incoming follow request when the current user does not want to approve the requester.

<CodeGroup>
  ```swift iOS theme={null}
  let relationship = AmityUserRelationship()
  let response = try await relationship.declineMyFollower(withUserId: "requester-user-id")
  _ = response
  ```

  ```kotlin Android theme={null}
  val disposable = AmityCoreClient.newUserRepository()
      .relationship()
      .declineMyFollower(userId = targetUserId)
      .subscribe(
          {
              showSuccessMessage()
          },
          { error ->
              handleGeneralError(error)
          },
      )
  ```

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

  const didDecline = await UserRepository.Relationship.declineMyFollower(userId);

  if (didDecline) {
    showSuccessMessage('Follow request declined');
  }
  ```

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

  final statusValue = status.value;
  ```
</CodeGroup>

## Related Topics

<CardGroup cols={3}>
  <Card title="Follow/Unfollow User" href="./follow-unfollow-user" icon="user-plus">
    Create or remove follow relationships.
  </Card>

  <Card title="Connection Status" href="./get-connection-status" icon="signal">
    Read status and counters.
  </Card>

  <Card title="Follower Lists" href="./get-follower-following-list" icon="list">
    Query pending or accepted followers.
  </Card>
</CardGroup>
