---
title: "Get my posts"
method: GET
path: "/social-media/posts/get/my"
tags: ["📸 Social Media"]
---

# Get my posts

`GET /social-media/posts/get/my`

## Request

- Base URL: `https://api.freeapi.app/api/v1`
- URL: `https://api.freeapi.app/api/v1/social-media/posts/get/my`
- Auth: none declared
- TypeScript: <https://skmtc.dev/hiteshchoudhary-ssesph/apis/freeapi/docs/social-media/posts/get/my/get.ts> (a function with typed inputs; its response is checked against the schema)

The API endpoint allows a logged-in user to fetch their own posts, which can be displayed on the "My Profile" page of the frontend.

When accessing this endpoint, the logged-in user's accessToken is used to authenticate and retrieve their specific posts from the backend.

## Query parameters

- `page` string
- `limit` string

## Response `200`

Get my posts

- object
  - `data` object
    - `hasNextPage` boolean
    - `hasPrevPage` boolean
    - `limit` number
    - `nextPage` unknown
    - `page` number
    - `posts` object[]
      - `__v` number
      - `_id` string
      - `author` object
        - `__v` number
        - `_id` string
        - `account` object
          - `_id` string
          - `avatar` object
            - `_id` string
            - `localPath` string
            - `url` string
          - `email` string
          - `username` string
        - `bio` string
        - `countryCode` string
        - `coverImage` object
          - `_id` string
          - `localPath` string
          - `url` string
        - `createdAt` string
        - `dob` string
        - `firstName` string
        - `lastName` string
        - `location` string
        - `owner` string
        - `phoneNumber` string
        - `updatedAt` string
      - `comments` number
      - `content` string
      - `createdAt` string
      - `images` object[]
        - `_id` string
        - `localPath` string
        - `url` string
      - `isBookmarked` boolean
      - `isLiked` boolean
      - `likes` number
      - `tags` string[]
      - `updatedAt` string
    - `prevPage` unknown
    - `serialNumberStartFrom` number
    - `totalPages` number
    - `totalPosts` number
  - `message` string
  - `statusCode` number
  - `success` boolean

---

[API](https://skmtc.dev/hiteshchoudhary-ssesph/apis/freeapi.md) - [All operations](https://skmtc.dev/hiteshchoudhary-ssesph/apis/freeapi/llms.txt) - [OpenAPI document](https://skmtc.dev/hiteshchoudhary-ssesph/apis/freeapi/revisions/a9f3a290e4dc?raw)
