API EndpointsconnectionsGet Current User Received Requests

Get Current User Received Pending Requests

Endpoint

URL: api.replyke.com/api/v6/:projectId/connections/pending/received

Method: GET

Authentication Required: Yes


Description

Get connection requests that others have sent to the current user and are still pending.


Request

Path Parameters

None

Query Parameters

ParameterTypeRequiredDescription
pagenumberNoPage number (default: 1)
limitnumberNoItems per page (default: 20, max: 100)

Headers

HeaderTypeRequiredDescription
AuthorizationstringYesBearer token for authentication.

Body Parameters

None

Example Request

GET api.replyke.com/api/v6/your-project-id/connections/pending/received?page=1&limit=20
Authorization: Bearer <ACCESS_TOKEN>

Response

Success Response (200 OK)

{
  "requests": [
    {
      "id": "connection-uuid",
      "type": "received",
      "user": {
        "id": "user-uuid",
        "name": "Jane Smith",
        "username": "janesmith",
        "avatar": "https://example.com/avatar.jpg",
        "bio": "Product Manager",
        "reputation": 200
      },
      "message": "Hi! I'd like to connect with you.",
      "createdAt": "2024-01-01T10:00:00.000Z"
    }
  ],
  "pagination": {
    "currentPage": 1,
    "totalPages": 1,
    "totalCount": 3,
    "hasNextPage": false,
    "hasPreviousPage": false,
    "limit": 20
  }
}

Error Responses

Unauthorized (401 Unauthorized)

{
  "error": "Authentication required",
  "code": "auth/unauthorized"
}

Server Error (500 Internal Server Error)

{
  "error": "Internal server error",
  "code": "connection/server-error"
}

Notes

  • Requires authentication
  • Returns paginated list of pending connection requests received by the current user
  • Each request includes the sender’s details and their message
  • Shows when each request was received
  • Users can accept or decline these requests using the connection ID
  • Default pagination: 20 items per page, maximum 100 items per page
  • Rate limiting: 100 requests per 5 minutes