Retrieve posts
Learn how to retrieve posts on LinkedIn using Unipile API.
About Post IDsBasically, Unipile uses base64 preformatted post IDs to simplify any interactions that require a post ID. These are the IDs to be used throughout, unless otherwise specified.
List user posts
To get a list of posts, use the List all User's Posts endpoint, specifying the ID of the user or company whose posts you want to retrieve.
To retrieve your own posts, set me as user_id.
Note about paginationPagination on this endpoint uses exclusively the
cursorparameter.
const { data } = await usersApi.getPostsList({
path: {
account_id: "acc_123456789",
user_id: "user_id",
},
});posts = users_api.get_posts_list("user_id", "acc_123456789")curl --request GET \
--url https://api.unipile.com/v2/account_id/users/user_id/posts \
--header 'accept: application/json'Retrieve post from ID
To get a single post, use the Get a Post endpoint, specifying the ID of the post you are looking for.
On this specific endpoint, LinkedIn native Post IDs are accepted (e.g. activity:7461257878499151234, ugcPost:7461257878499155678).
const { data } = await postsApi.getPost({
path: {
account_id: "acc_123456789",
post_id: "post_id",
},
});post = posts_api.get_post("post_id", "acc_123456789")curl --request GET \
--url https://api.unipile.com/v2/account_id/posts/post_id \
--header 'accept: application/json'Updated about 7 hours ago