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

# Fetch received pending connections

> Fetch connection requests received by the current user that are still pending

## Overview

Returns a function that fetches the paginated list of connection requests that other users have sent to the current authenticated user and that have not yet been accepted or declined.

## Usage Example

```tsx theme={null}
import { useFetchReceivedPendingConnections } from "@replyke/react-js";
import { useAcceptConnection } from "@replyke/react-js";

function IncomingRequests() {
  const fetchReceivedPendingConnections = useFetchReceivedPendingConnections();
  const acceptConnection = useAcceptConnection();
  const [requests, setRequests] = useState([]);

  useEffect(() => {
    fetchReceivedPendingConnections({ page: 1 }).then((res) => {
      setRequests(res.data);
    });
  }, []);

  return (
    <ul>
      {requests.map(({ id, user }) => (
        <li key={id}>
          {user.name} wants to connect
          <button onClick={() => acceptConnection({ connectionId: id })}>Accept</button>
        </li>
      ))}
    </ul>
  );
}
```

## Parameters

The hook returns a function. That function accepts:

<ParamField path="page" type="number">
  Page number to fetch. Defaults to `1`.
</ParamField>

<ParamField path="limit" type="number">
  Number of results per page. Defaults to `20`.
</ParamField>

## Returns

Returns a `PaginatedResponse` containing pending connection entries:

<ResponseField name="data" type="PendingConnection[]">
  Array of pending connection entries.

  <Expandable title="PendingConnection properties">
    <ResponseField name="id" type="string">
      ID of the connection record.
    </ResponseField>

    <ResponseField name="user" type="User">
      The user who sent the request. See [User data model](/data-models/user).
    </ResponseField>

    <ResponseField name="type" type="&#x22;received&#x22;">
      Always `"received"` for this endpoint.
    </ResponseField>

    <ResponseField name="message" type="string | undefined">
      Optional message included with the request.
    </ResponseField>

    <ResponseField name="createdAt" type="string">
      ISO timestamp when the request was created.
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="pagination" type="object">
  Pagination metadata including `page`, `pageSize`, `totalPages`, `totalItems`, and `hasMore`.
</ResponseField>

## Related

* [useFetchSentPendingConnections](/hooks/connections/use-fetch-sent-pending-connections) — outgoing requests
* [useAcceptConnection](/hooks/connections/use-accept-connection) — accept a received request
* [useDeclineConnection](/hooks/connections/use-decline-connection) — decline a received request
