Users & followers
Retrieve Instagram profiles and manage follows and follow requests.
Profiles and followers
Use Get a User Profile with a user ID, or me for the connected account. Use List all User Followers and List all User Followings to browse followers and followed accounts. Visibility depends on Instagram privacy settings.
Use Follow a User and Unfollow a User to manage follows. For pending requests, use List all pending Relation / Follow requests, Accept a Relation request, or Cancel or Refuse a Relation / Follow request. Listing sent requests is not supported.
Retrieve a profile
const { data } = await usersApi.getUserProfile({
path: { account_id: "acc_123456789", user_id: "user_id" },
});profile = users_api.get_user_profile("user_id", "acc_123456789")curl --request GET \
--url 'https://api.unipile.com/v2/acc_123456789/users/user_id' \
--header 'X-API-KEY: YOUR_API_KEY'Update your profile
Update a User Profile accepts me as the user ID on Instagram. You can update the biography and profile picture; other profile fields are not supported.
Block or unblock a user
Use Block a User or Unblock a User with the connected account ID and the target user ID.
Subscribe to blocked.new to receive block and unblock changes. Check payload.status for blocked or unblocked. See Configure a webhook.
Instagram records the initial block list without emitting past changes, then detects subsequent differences.
Block and unblock a user
const { data: blocked } = await usersApi.blockUser({
path: { user_id: "user_id", account_id: "acc_123456789" },
});
// Unblock when needed.
const { data: unblocked } = await usersApi.unblockUser({
path: { user_id: "user_id", account_id: "acc_123456789" },
body: {},
});blocked = users_api.block_user("user_id", "acc_123456789")
# Unblock when needed.
unblocked = users_api.unblock_user(
"user_id", "acc_123456789", {}
)curl --request POST \
--url 'https://api.unipile.com/v2/acc_123456789/users/me/block/user_id' \
--header 'X-API-KEY: YOUR_API_KEY'
# Unblock when needed.
curl --request POST \
--url 'https://api.unipile.com/v2/acc_123456789/users/me/unblock/user_id' \
--header 'X-API-KEY: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{}'Updated 9 days ago