Skip to content
Ramtin Jokar edited this page Dec 16, 2018 · 5 revisions

You can find all user functions in IInstaApi.UserProcessor class.

There are many functions exists for user. You can see some of it in here:

How can I get current user information?

var currentUser = await InstaApi.UserProcessor.GetCurrentUserAsync();

Note: I suggest you to use InstaApi.UserProcessor.GetUserInfoByIdAsync or InstaApi.UserProcessor.GetUserInfoByUsernameAsync to get current user information.

var currentUser = await InstaApi
    .UserProcessor.GetUserInfoByIdAsync(InstaApi.GetLoggedUser().LoggedInUser.Pk);

How can I get a tiny user information?

var user = await InstaApi.UserProcessor.GetUserAsync("username");

Note: don't use GetUserAsync, it doesn't have a lot of properties. Use InstaApi.UserProcessor.GetUserInfoByIdAsync or InstaApi.UserProcessor.GetUserInfoByUsernameAsync instead.

How can I get user information by username?

var userInfo = await InstaApi.UserProcessor
    .GetUserInfoByUsernameAsync("username");

How can I get user information by user id (pk)?

var userInfo = await InstaApi
    .UserProcessor.GetUserInfoByIdAsync(1647718432);

How can I get followers list for current user?

var currentFollowsers = await InstaApi.UserProcessor
    .GetCurrentUserFollowersAsync(PaginationParameters.MaxPagesToLoad(1));

How can I get followers list of someone by username?

var userFollowers = await InstaApi.UserProcessor
    .GetUserFollowersAsync("username", PaginationParameters.MaxPagesToLoad(1));

How can I get following list of someone by username?

var userFollowings = await InstaApi.UserProcessor
    .GetUserFollowingAsync("username", PaginationParameters.MaxPagesToLoad(1));

How can I get recent activity?

var recentActivity = await InstaApi.UserProcessor
    .GetRecentActivityFeedAsync(PaginationParameters.MaxPagesToLoad(1));

How can I get friendship status for a user id(pk)?

var friendshipStatus = await InstaApi.UserProcessor.GetFriendshipStatusAsync(1647718432);

How can I get someone's media feeds?

var userMedias = await InstaApi.UserProcessor
    .GetUserMediaAsync("username", PaginationParameters.MaxPagesToLoad(1));

How can I get full user information?

This will returns you: user info, feeds, stories, broadcasts

var fullUserInfo = await InstaApi.UserProcessor.GetFullUserInfoAsync(1647718432);

How can I get pending friendship list?

var pendingFriendRequests = await InstaApi.UserProcessor.GetPendingFriendRequestsAsync();

How can I approve a friendship request?

var acceptFriendship = await InstaApi.UserProcessor.AcceptFriendshipRequestAsync(1647718432);

How can I deny a friendship request?

var ignoreFriendship = await InstaApi.UserProcessor.IgnoreFriendshipRequestAsync(1647718432);

How can I follow a user?

var followUser = await InstaApi.UserProcessor.FollowUserAsync(1647718432);

How can I unfollow a user?

var unfollowUser = await InstaApi.UserProcessor.UnFollowUserAsync(1647718432);

How can I get blocked user list of current user?

var blockedUsers = await InstaApi.UserProcessor.GetBlockedUsersAsync(PaginationParameters.MaxPagesToLoad(1));

How can I block a user?

var blockUser = await InstaApi.UserProcessor.BlockUserAsync(1647718432);

How can I unblock a user?

var unblockUser = await InstaApi.UserProcessor.UnBlockUserAsync(1647718432);

How can I get user tags by username?

var userTags = await InstaApi.UserProcessor
    .GetUserTagsAsync("username", PaginationParameters.MaxPagesToLoad(1));

How can I get user tags by user id (pk)?

var userTags = await InstaApi.UserProcessor
    .GetUserTagsAsync(1647718432, PaginationParameters.MaxPagesToLoad(1));