Skip to content

Profile

Rahil khan edited this page Mar 14, 2024 · 2 revisions

This class contains all the methods related to a user profile.

You can get the profile of any user with a username like this:

Profile profile = insta.getProfile("x0.rahil");

To get followers/following of the user

List<String> followers = profile.getFollowers(10);
List<String> followings = profile.getFollowings(10);

This method follows auto pagination, which means, that every call of this method will return you the next messages from the thread.

To get the active story of the user:

List<Story> stories = profile.getStories();

If no story is uploaded, then it will return null.

To get highlights of the user:

List<List<Story>> highlights = profile.getHighlights();

This method returns a list of multiple stories since each highlight can have multiple stories.

The inner list of stories is the list of stories of 1 highlight, and the outer list is the total highlights.

This are the basic information about the profile:

var bio = profile.biography;
var count = profile.followers;
var name = profile.full_name;

...  // and so on.

Some basic actions related to the profile:

profile.follow();
profile.unfollow();
profile.block();