instagram-private-api icon indicating copy to clipboard operation
instagram-private-api copied to clipboard

400 Bad request - Trying to upload photo or album

Open eileooo opened this issue 4 years ago • 7 comments

Requirements

  • [x] I've searched the Issues
  • [x] I've read the basic concepts
  • [x] I'm using the latest version
  • [ ] I've debugged my code using the DEBUG variable.

Platform

  • [x] I'm using Node.js version v12.18.1

Description

I'm trying to public a image or album but it's returning 400 Bad Request. (The file path is correct, I've checked!)

Code

ig.publish.photo({
    file: waitingFile,
    caption: waitingDescription
});

Error and Output

(node:3788) UnhandledPromiseRejectionWarning: IgResponseError: POST /rupload_igphoto/1610720084925_0_8828849218 - 400 Bad Request;
    at Request.handleResponseError (C:\Users\garci\Documents\Tecticias\bot_local\node_modules\instagram-private-api\dist\core\request.js:125:16)
    at Request.send (C:\Users\garci\Documents\Tecticias\bot_local\node_modules\instagram-private-api\dist\core\request.js:53:28)
    at async UploadRepository.photo (C:\Users\garci\Documents\Tecticias\bot_local\node_modules\instagram-private-api\dist\repositories\upload.repository.js:17:26)
    at async PublishService.photo (C:\Users\garci\Documents\Tecticias\bot_local\node_modules\instagram-private-api\dist\services\publish.service.js:79:31)

eileooo avatar Jan 15 '21 14:01 eileooo

What's the file type you're trying to upload? Only Jpeg files are supported by instagram.

Nerixyz avatar Jan 18 '21 12:01 Nerixyz

What's the file type you're trying to upload? Only Jpeg files are supported by instagram.

.jpg images only.

eileooo avatar Jan 18 '21 20:01 eileooo

Do you have a sample image?

Nerixyz avatar Jan 19 '21 05:01 Nerixyz

Hi, I am getting this error today. I can not upload photo anymore

This is the file that I upload https://drive.google.com/file/d/12BS-Jl9gZEdhdpR5YIkZa0-0CZHaU0iQ/view?usp=sharing

This is the error I got

Error: POST /api/v1/media/configure/ - 400 Bad Request; at Request.handleResponseError (D:\Projects\Electron\mairasecure\node_modules\instagram-private-api\dist\core\request.js:125) at Request.send (D:\Projects\Electron\mairasecure\node_modules\instagram-private-api\dist\core\request.js:53) at process._tickCallback (internal/process/next_tick.js:68)

The file is square and it's .jpeg

abdulahkam avatar Mar 26 '21 12:03 abdulahkam

Hi, I am getting this error today. I can not upload photo anymore

This is the file that I upload https://drive.google.com/file/d/12BS-Jl9gZEdhdpR5YIkZa0-0CZHaU0iQ/view?usp=sharing

This is the error I got

Error: POST /api/v1/media/configure/ - 400 Bad Request; at Request.handleResponseError (D:\Projects\Electron\mairasecure\node_modules\instagram-private-api\dist\core\request.js:125) at Request.send (D:\Projects\Electron\mairasecure\node_modules\instagram-private-api\dist\core\request.js:53) at process._tickCallback (internal/process/next_tick.js:68)

The file is square and it's .jpeg

same issue

jonathann403 avatar Mar 29 '21 10:03 jonathann403

This is the file that I upload https://drive.google.com/file/d/12BS-Jl9gZEdhdpR5YIkZa0-0CZHaU0iQ/view?usp=sharing

I tried the file and it works fine. Make sure to always upload the right filetype (Use file image.jpg to test if it's a real jpeg).

Nerixyz avatar Apr 15 '21 11:04 Nerixyz

@eileooo @GamerStop @abdulahkam

use small size jpg images (for example 1696x1064) everything works at this size

https://user-images.githubusercontent.com/22846441/133135927-a69e57cf-375d-481a-9609-8e084ac236f1.jpg

@Nerixyz I have error for this image (size 6240x4160) https://user-images.githubusercontent.com/22846441/133138733-c45e5703-cddc-4895-8e06-acccbc64c76f.JPG

igorurr avatar Sep 13 '21 18:09 igorurr