Skip to content

Function: caaLogin() ​

ts
function caaLogin(
   client, 
   credentials, 
   options?
): Promise<PrivateResponseJson>;

Logs in through Instagram's current Android CAA/Bloks flow, which replaced the retired accounts/login/ endpoint. Registers the device's USDID key, runs the CAA preflight (account access context + keystore attestation), then sends the encrypted password. On success the session carries the user id and the authorization token. When the account needs a two-factor code, the login resolves it itself if options.twoFactor says where the code comes from; otherwise a CaaTwoFactorRequiredError is thrown, to be resolved with resolveCaaTwoFactor.

Parameters ​

ParameterType
clientPrivateClient
credentialsCaaLoginCredentials
options?CaaLoginOptions

Returns ​

Promise<PrivateResponseJson>

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