Thread:Project:Support desk/1.17.0 cookies error with image upload script/reply

You need to request the login page, save the cookies and provide the username and password with the login token. There are some mediawiki frameworks which already take care of these details.

Alternatively, you can use the maintenance/importImages.php script on the server.