# How to Get Selected user post form its join community

**URL:** <https://forum.social.plus/t/how-to-get-selected-user-post-form-its-join-community/989>\
**Category:** Android\
**Created:** [November 24, 2023, 6:59am UTC](https://forum.social.plus/t/how-to-get-selected-user-post-form-its-join-community/989 "2023-11-24T06:59:13Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Anuj\_Rai](https://avatars.discourse-cdn.com/v4/letter/a/8491ac/32.png) [@Anuj\_Rai](https://forum.social.plus/u/Anuj_Rai)\
**Post date:** [November 24, 2023, 6:59am UTC](https://forum.social.plus/t/how-to-get-selected-user-post-form-its-join-community/989/1 "2023-11-24T06:59:13Z")

</div>

As per our requirements, we are building a profile timeline where we want to show the post user has created in a particular community where user is part of. But we are not able to see any documentation to find this particular list of posts created by user in the community.

Kindly help us, how the above thing can be accomplished. Thanks!

---

<div class="post-metadata">

**Author:** ![SocialPlus\_Support](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.social.plus/socialplus_support/32/798_2.png) [@SocialPlus\_Support](https://forum.social.plus/u/SocialPlus_Support)\
**Post date:** [November 24, 2023, 11:09am UTC](https://forum.social.plus/t/how-to-get-selected-user-post-form-its-join-community/989/2 "2023-11-24T11:09:18Z")

</div>

Hello, Anuj

For your specific use case, we recommend exploring the Content Search feature. You can find additional information at the following link: [https://docs.amity.co/developers/beta-features/content-search](https://docs.amity.co/developers/beta-features/content-search)

and here’s an example for you:

**Case 1** : User A searches for posts by User A in Community A.

```auto
{
    "apiKey": "apiKey",
    "userId": "A",
    "query": {
        "targetType": "community",
        "targetId": [
            "communityId"
        ],
        "postedUserId": "A",
        "text": ""
    }
}

```

**Case 2:** User B searches for posts by User A in all public communities.

```auto
{
    "apiKey": "apiKey",
    "userId": "B",
    "query": {
        "targetType": "public",
        "publicSearch": "true",
        "postedUserId": "A",
        "text": ""
    }
}

```

Best regards,

Support Team

---

<div class="post-metadata">

**Author:** ![Anuj\_Rai](https://avatars.discourse-cdn.com/v4/letter/a/8491ac/32.png) [@Anuj\_Rai](https://forum.social.plus/u/Anuj_Rai)\
**Post date:** [November 25, 2023, 12:53pm UTC](https://forum.social.plus/t/how-to-get-selected-user-post-form-its-join-community/989/3 "2023-11-25T12:53:25Z")

</div>

@SocialPlus_Support i have tried to implement the above solution But i am facing issue in it.

Firstly I have generated the Access-Token form session Api  
`https://api.sg.amity.co/api/v3/sessions`

Then I have call content-Search api by passing the accessToken which i have received from above Api call.

```auto
curl --location 'https://beta.amity.services/search/posts' \
--header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
--header 'Content-Type: application/json' \
--data '{
    "apiKey": "YOUR_API_KEY",
    "userId": "YOUR_USER_ID",
    "query": {
        "targetType": "community",
        "targetId": [
            "TARGET_COMMUNITY_ID"
        ],
        "postedUserId": "POSTED_USER_ID",
        "text": ""
    }
}'

```

But have receiving `500 Internal Server Error.`

What should i should do?

---

<div class="post-metadata">

**Author:** ![SocialPlus\_Support](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.social.plus/socialplus_support/32/798_2.png) [@SocialPlus\_Support](https://forum.social.plus/u/SocialPlus_Support)\
**Post date:** [November 27, 2023, 5:06am UTC](https://forum.social.plus/t/how-to-get-selected-user-post-form-its-join-community/989/4 "2023-11-27T05:06:51Z")

</div>

For your use case , We recommend that you use `https://beta.amity.services/search/v2/posts` instead.

Best regards,

Support Team

---

<div class="post-metadata">

**Author:** ![Anuj\_Rai](https://avatars.discourse-cdn.com/v4/letter/a/8491ac/32.png) [@Anuj\_Rai](https://forum.social.plus/u/Anuj_Rai)\
**Post date:** [November 27, 2023, 6:59am UTC](https://forum.social.plus/t/how-to-get-selected-user-post-form-its-join-community/989/5 "2023-11-27T06:59:37Z")

</div>

@SocialPlus_Support I have tried to this url but still i am getting this **500 Internal Error**. Could u please list me what can be cause of this? i am passing same request body and header to this url.

---

<div class="post-metadata">

**Author:** ![SocialPlus\_Support](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.social.plus/socialplus_support/32/798_2.png) [@SocialPlus\_Support](https://forum.social.plus/u/SocialPlus_Support)\
**Post date:** [November 27, 2023, 7:28am UTC](https://forum.social.plus/t/how-to-get-selected-user-post-form-its-join-community/989/6 "2023-11-27T07:28:15Z")

</div>

Your request seems correct. However, we have noticed that you have not yet requested to enable the Content Search feature. Our support team will contact you via email to assist further.

Best regards,

Support Team

---

<div class="post-metadata">

**Author:** ![Anuj\_Rai](https://avatars.discourse-cdn.com/v4/letter/a/8491ac/32.png) [@Anuj\_Rai](https://forum.social.plus/u/Anuj_Rai)\
**Post date:** [November 27, 2023, 7:17pm UTC](https://forum.social.plus/t/how-to-get-selected-user-post-form-its-join-community/989/7 "2023-11-27T19:17:03Z")

</div>

Hi @SocialPlus_Support I have contacted with support team i got the reply of successfully enable the content search but now i am getting the Json response with **Feature is not enabled**

**Request body**

```auto
curl --location 'https://beta.amity.services/search/v2/posts' \
--header 'Authorization: Bearer ACCESS_TOKEN' \
--header 'Content-Type: application/json' \
--data '{
    "apiKey": "API_KEY",
    "userId": "USER_ID",
    "query": {
        "targetType": "community",
        "targetId": [
            "COMMUNITY_ID"
        ],
        "postedUserId": "POSTED_USER_ID",
        "text": ""
    }
}'

```

**Response Body**

```auto
{
    "success": false,
    "message": "Feature is not enabled"
}

```

---

<div class="post-metadata">

**Author:** ![SocialPlus\_Support](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.social.plus/socialplus_support/32/798_2.png) [@SocialPlus\_Support](https://forum.social.plus/u/SocialPlus_Support)\
**Post date:** [November 27, 2023, 7:49pm UTC](https://forum.social.plus/t/how-to-get-selected-user-post-form-its-join-community/989/8 "2023-11-27T19:49:27Z")

</div>

Hello, could you kindly provide the full cURL command, along with the user ID, in your existing email correspondence with our support team? Our team will assist in verifying this issue. Thank you.
