Logo Blkem - The Black Empowerment Network
Blkem - API
  • Get started
  • Login
  • Social login
  • Signup
  • Confirm Registration
  • Reset password
  • Timeline feed
  • Sponsored ads
  • Profile data (2)
  • Report profile
  • Block user
  • Notification token
  • Change password
  • Refresh access token
  • Logout user
  • Verify user
  • Post & Reply (4)
  • Vote polls
  • Create swift (7)
  • Thread data (2)
  • Like / Unlike
  • Report post
  • Repost post
  • Remove Repost post
  • Bookmarks (2)
  • Post likes
  • Delete post
  • Search hashtags
  • Search people
  • Search posts
  • Pin post to profile
  • Un-pin post from profile
  • Update profile data
  • Avatar & Cover (3)
  • User privacy (2)
  • Follow & Unfollow
  • Fetch following
  • Fetch followers
  • Follows you
  • Follow requests (3)
  • Get notifications
  • Delete notifications
  • Messaging (6)
  • Delete account
  • Change language
  • Get plans
  • Get user plan
  • Change user plan
  • Cancel user plan
  • Get subscriptions
  • Get pinned notification
How it works - 1 Upload media - 2 Delete media - 3 Repost - 4 Privacy - 5

How it works?

In order to repost using api, you need to know how it works in the backend.

The post and the repost to it are absolutely the same thing, except that the repost is attributed to some post. As for his media structure and behavior, it is the same as a regular post.

Just sending texts and media files at one time to create a repost will not work, since it is created step by step.

Description of how the system works when creating a media post, that is (Image / Video) post. (Not gif)

  • 1. First you upload media files (Video/Images)
  • 2. Then just repost the post using the endpoints described below

Description of how the system works when creating a (GIF/Text) post

  • 1. By creating a simple text post or a GIF image, we can send all with one request as shown below.

Upload post media

Please use this (https://blkem.com/mobile_api/upload_post_media) API endpoint for uploading post multimedia files


Post parameters

Field Value Remarks
session_id ​Access token ID E.g. de25cc16eb00960f076...
type Media file type (image/video/audio) E.g. image
file Media file (Image/Video/audio) E.g. some-selfy-picture.jpeg

Success response (Image uplaod)

{
    	"message": "Media file uploaded successfully",
    	"code": 200,
    	"data": {
    		"media_id": 4,
    		"url": "An absolute URL of new uploded media file",
    		"type": "Image/Video/Audio"
    	}
    }
    

Success response (Video uplaod)

{
    	"message": "Media file uploaded successfully",
    	"code": 200,
    	"data": {
        	"media_id": 18,
        	"type": "Video",
        	"source": "An absolute URL of new uploded video file",
        	"poster": "An absolute URL of auto generated video thumbnail file"
        }
    }
    

Error responses

{
        "code": 401,
        "data": [],
        "message": "Unauthorized Access"
    }

    {
    	"code": 500,
    	"message": "Media file is missing or invalid",
    	"data": []
    }


    {
    	"code": 400,
    	"message": "Media file type is missing or invalid",
    	"data": []
    }

    {
    	"code": 400,
    	"message": "You cannot attach more than 10 images to a post",
    	"data": []
    }

    {
    	"code": 500,
    	"message": "An error occurred while processing your request. Please try again later.",
    	"data": []
    }
    

Delete post media

Please use this (https://blkem.com/mobile_api/delete_post_media) API endpoint for deleteing post multimedia files


Post parameters

Field Value Remarks
session_id ​Access token ID E.g. de25cc16eb00960f076...
type ​Media file type (Image/Video) E.g. image
media_id ​Media file ID E.g. 45

Success response

{
        "code": 200,
        "data": [],
        "message": "Media deleted successfully"
    }
    

Error responses

{
        "code": 401,
        "data": [],
        "message": "Unauthorized Access"
    }

    {
    	"code": 400,
    	"message": "Media file type is missing or invalid",
    	"data": []
    }

    {
        "code": 500,
        "message": "An error occurred while processing your request. Please try again later.",
        "data": []
    }
    

Repost Publication

Please use this (https://blkem.com/mobile_api/repost) API endpoint for pulishing port or it's reply


Post parameters

Field Value Remarks
session_id ​Access token ID E.g. de25cc16eb00960f076...
post_text ​Post text message (Max. 600 chars) E.g. `Hello world!`
thread_id ​Thered int. ID ID of post to repost (Required)
type repost: without comment
new: with comment
`repost` or `new`
gif_src ​Gif image source URL Only if the post does not contain other media files (Video or Image)
og_data ​Extracted OG data from URL Only if the post does not contain other media files (Video or Image or GIF)
poll_data ​Poll JSON data Json array with poll option objects. E.g. [{"value": "Option 1"}, {"value": "Option 2"}, {..}] From 2 to 4 options
privacy ​Publication privacy settings (Ignored for replies to posts) One of those values (everyone, followers, mentioned)

Success response

{
    "code": 200,
    "data": {
        "id": 39,
        "user_id": 6098,
        "text": "test4",
        "type": "text",
        "replys_count": "0",
        "reposts_count": "0",
        "likes_count": "0",
        "status": "active",
        "thread_id": 1,
        "target": "publication",
        "og_data": "",
        "poll_data": null,
        "priv_wcs": "everyone",
        "priv_wcr": "everyone",
        "time": "just now",
        "advertising": false,
        "time_raw": "1645717057",
        "og_text": "test4",
        "og_image": "statics/img/logo.png",
        "htags": [],
        "url": "http://localhost/blkem-new//thread/39",
        "can_delete": true,
        "media": [],
        "is_owner": true,
        "has_liked": false,
        "has_saved": false,
        "has_reposted": false,
        "is_blocked": false,
        "is_reported": false,
        "me_blocked": false,
        "can_see": true,
        "reply_to": {
            "id": 6098,
            "url": "http://localhost/blkem-new//abiidars",
            "avatar": "http://localhost/blkem-new//upload/default/avatar.png",
            "username": "abiidars",
            "name": "Abid Raza",
            "gender": "O",
            "is_owner": true,
            "thread_url": "http://localhost/blkem-new//thread/1"
        },
        "owner": {
            "id": 6098,
            "url": "http://localhost/blkem-new//abiidars",
            "avatar": "http://localhost/blkem-new//upload/default/avatar.png",
            "username": "abiidars",
            "name": "Abid Raza",
            "verified": "1",
            "assigned_badge": "brown"
        },
        "offset_id": 39
    },
    "message": "Post reposted successfully",
    "reposts_count": 10
}
    

Error responses

{
        "code": 401,
        "data": [],
        "message": "Unauthorized Access"
    }

    {
    	"code": 400,
    	"message": "Already reposted",
    	"data": []
    }

    

Change post privacy

Please use this (https://blkem.com/mobile_api/change_post_privacy) API endpoint for changing post privacy

You will need this endpoint if you want to change the privacy of the post, that is, the option "Who can reply"

However, keep in mind that this option is only available for Posts that do not have a parent chain. That is, the post should be the original post and not the answer.


Post parameters

Field Value Remarks
session_id Access token ID E.g. de25cc16eb00960f076...
post_id Publication int ID E.g. 11
privacy Publication privacy settings (Ignored for replies to posts) One of those values (everyone, followers, mentioned)

Success response

{
        "code": 200,
        "message": "Post privacy changed successfully",
        "data": []
    }
    

Error responses

{
        "code": 401,
        "data": [],
        "message": "Unauthorized Access"
    }

    {
        "code": 400,
        "message": "Post ID is missing or invalid. Please check your details",
        "data": []
    }