Skip to content

Interface: AccountApi ​

The logged-in account itself.

Methods ​

activity() ​

ts
activity(): Promise<Activity>;

The activity feed (likes, comments, new followers), first page. Marks nothing as seen.

Returns ​

Promise<Activity>


ts
links(): Promise<object[]>;

The links listed on the profile.

Returns ​

Promise<object[]>


me() ​

ts
me(): Promise<Record<string, unknown>>;

The current account's own profile; also the simplest check that auth is accepted.

Returns ​

Promise<Record<string, unknown>>


ts
removeLinks(linkIds): Promise<object[]>;

Removes profile links by link_id, returning the list that remains.

Parameters ​

ParameterType
linkIdsstring[]

Returns ​

Promise<object[]>


removePicture() ​

ts
removePicture(): Promise<{
[key: string]: unknown;
  biography?: string;
  external_url?: string | null;
  follower_count?: number | null;
  following_count?: number | null;
  full_name?: string;
  is_private?: boolean;
  is_verified?: boolean;
  media_count?: number | null;
  pk?: string;
  profile_pic_url?: string | null;
  username?: string;
}>;

Removes the profile picture, back to the default avatar.

Returns ​

Promise<{ [key: string]: unknown; biography?: string; external_url?: string | null; follower_count?: number | null; following_count?: number | null; full_name?: string; is_private?: boolean; is_verified?: boolean; media_count?: number | null; pk?: string; profile_pic_url?: string | null; username?: string; }>


setBiography() ​

ts
setBiography(text): Promise<{
[key: string]: unknown;
  biography?: string;
  external_url?: string | null;
  follower_count?: number | null;
  following_count?: number | null;
  full_name?: string;
  is_private?: boolean;
  is_verified?: boolean;
  media_count?: number | null;
  pk?: string;
  profile_pic_url?: string | null;
  username?: string;
}>;

Sets the account's biography, returning the updated profile.

Parameters ​

ParameterType
textstring

Returns ​

Promise<{ [key: string]: unknown; biography?: string; external_url?: string | null; follower_count?: number | null; following_count?: number | null; full_name?: string; is_private?: boolean; is_verified?: boolean; media_count?: number | null; pk?: string; profile_pic_url?: string | null; username?: string; }>


ts
setLink(url, title?): Promise<object[]>;

Sets the profile link, returning the list as the profile now holds it.

Parameters ​

ParameterType
urlstring
title?string

Returns ​

Promise<object[]>


setName() ​

ts
setName(name): Promise<{
[key: string]: unknown;
  biography?: string;
  external_url?: string | null;
  follower_count?: number | null;
  following_count?: number | null;
  full_name?: string;
  is_private?: boolean;
  is_verified?: boolean;
  media_count?: number | null;
  pk?: string;
  profile_pic_url?: string | null;
  username?: string;
}>;

Changes the display name (Instagram limits this to a couple of changes per 14 days).

Parameters ​

ParameterType
namestring

Returns ​

Promise<{ [key: string]: unknown; biography?: string; external_url?: string | null; follower_count?: number | null; following_count?: number | null; full_name?: string; is_private?: boolean; is_verified?: boolean; media_count?: number | null; pk?: string; profile_pic_url?: string | null; username?: string; }>


setPicture() ​

ts
setPicture(jpeg): Promise<{
[key: string]: unknown;
  biography?: string;
  external_url?: string | null;
  follower_count?: number | null;
  following_count?: number | null;
  full_name?: string;
  is_private?: boolean;
  is_verified?: boolean;
  media_count?: number | null;
  pk?: string;
  profile_pic_url?: string | null;
  username?: string;
}>;

Replaces the profile picture with a JPEG, returning the updated profile.

Parameters ​

ParameterType
jpegUint8Array

Returns ​

Promise<{ [key: string]: unknown; biography?: string; external_url?: string | null; follower_count?: number | null; following_count?: number | null; full_name?: string; is_private?: boolean; is_verified?: boolean; media_count?: number | null; pk?: string; profile_pic_url?: string | null; username?: string; }>

MIT License. Not affiliated with, endorsed or sponsored by Meta or Instagram.