Skip to content

loginWithCookies started giving "Please login with instagram credentials" error  #350

@deepvision7

Description

@deepvision7

Both methods to login with cookies (manual or from cache) stopped working. After using the either one it gets "Please login with instagram credentials" error now. Login with credentials works fine.

/** 1. Get cookies from file */
$sessionId = $cachePool->getItem(Session::SESSION_KEY . '.' . CacheHelper::sanitizeUsername($credentials->getLogin()))
                       ->get()
                       ->getCookieByName('sessionId');

// Generate CookieJar from instagram cookie 'sessionid'
$cookieJar = new CookieJar(false, [$sessionId]);

/** 2. Insert cookies manually
$sessionId = new SetCookie([
    "Name"     => "sessionid",
    "Value"    => "YOUR_INSTAGRAM_SESSIONID",
    "Domain"   => ".instagram.com",
    "Path"     => "/",
    "Expires"  => "YOUR_INSTAGRAM_SESSIONID_EXPIRES",
    "Max-Age"  => "31536000",
    "Secure"   => true,
    "Discard"  => false,
    "HttpOnly" => true,
]);
// Generate CookieJar from instagram cookie 'sessionid'
$cookieJar = new CookieJar(false, [$sessionId]);
*/

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions