Skip to content

Class: IgFlare ​

The ergonomic entry point. Wraps the low-level engine and groups the endpoints by domain (ig.user.*, ig.friendship.*, ig.feed.*, ig.media.*). Persistence is pluggable: pass any SessionStore (memory, file, or a provider adapter) as store. The transport retries transient failures by default.

Constructors ​

Constructor ​

ts
new IgFlare(options?): IgFlare;

Parameters ​

ParameterType
options?IgFlareOptions

Returns ​

IgFlare

Properties ​

PropertyModifierType
accountreadonlyAccountApi
collectionreadonlyCollectionApi
directreadonlyDirectApi
explorereadonlyExploreApi
feedreadonlyFeedApi
friendshipreadonlyFriendshipApi
hashtagreadonlyHashtagApi
highlightreadonlyHighlightApi
insightsreadonlyInsightsApi
locationreadonlyLocationApi
mediareadonlyMediaApi
notesreadonlyNotesApi
reelsreadonlyReelsApi
searchreadonlySearchApi
storyreadonlyStoryApi
uploadreadonlyUploadApi
userreadonlyUserApi

Accessors ​

client ​

Get Signature ​

ts
get client(): PrivateClient;

The underlying engine, for requests the facade does not yet wrap.

Returns ​

PrivateClient


session ​

Get Signature ​

ts
get session(): SessionData;

The current session (device, auth, location).

Returns ​

SessionData

Methods ​

login() ​

ts
login(credentials): Promise<PrivateResponseJson>;

Logs in with username and password through the CAA/Bloks flow. If the account asks for a second factor, pass twoFactor (a code, a TOTP secret, or a function that provides one) and the login resolves it. Without it a CaaTwoFactorRequiredError is thrown, to finish with resolveTwoFactor.

Parameters ​

ParameterType
credentialsIgFlareLogin

Returns ​

Promise<PrivateResponseJson>


resolveTwoFactor() ​

ts
resolveTwoFactor(error, code): Promise<PrivateResponseJson>;

Finishes a login that stopped at the two-factor step by submitting the code.

Parameters ​

ParameterType
errorCaaTwoFactorRequiredError
codestring | TwoFactorSource

Returns ​

Promise<PrivateResponseJson>


fromStore() ​

ts
static fromStore(store, options?): Promise<IgFlare>;

Builds a client from a saved session in the given store.

Parameters ​

ParameterType
storeSessionStore
options?Omit<IgFlareOptions, "store" | "session">

Returns ​

Promise<IgFlare>

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