dilame / instagram-private-api

NodeJS Instagram private API SDK. Written in TypeScript.
MIT License
6.02k stars 1.14k forks source link

Error while trying to call 'api/v1/media/configure_to_igtv/' manually #1567

Open bezrazli4n0 opened 2 years ago

bezrazli4n0 commented 2 years ago

General Question

This question is not related to api library, instead related to instagram api.

Notes

I'm trying to manually call instagram api endpoints to upload video in post. All endpoints return successful results, ids, etc..

Headers, that used in video-related requests:

Body, that used in configure_to_igtv request(signed_body=SIGNATURE. included):

  {
    "is_igtv_video": "1",
    "is_unified_video": "1",
    "igtv_ads_toggled_on": "0",
    "camera_entry_point": "173",
    "filter_type": "0",
    "timezone_offset": "10800",
    "media_folder": "Camera",
    "source_type": "4",
    "_uid": "xxx",
    "device_id": "xxx",
    "keep_shoppable_products": "0",
    "_uuid": "xxx",
    "caption": "",
    "date_time_original": "19040101T000000.000Z",
    "igtv_share_preview_to_feed": "0",
    "upload_id": "the same, that used in previous requests",
    "igtv_composer_session_id": "5bd65f86-68a2-4e3f-a094-2e51bfc7144b",
    "device": {
      "manufacturer": "Xiaomi",
      "model": "Mi 9T",
      "android_version": 29,
      "android_release": "10"
    },
    "length": 10.000,
    "clips": [
      {
        "length": 10.000,
        "source_type": "4"
      }
    ],
    "extra": {
      "source_width": 540,
      "source_height": 540
    },
    "audio_muted": false,
    "poster_frame_index": 0
  }

Flow that i use:

Form

Question

Why i receive server processing error: um_request_failure error while trying to manually upload video in post?, how i can fix that?

Code

Error and Output

{
    "message": "server processing error: um_request_failure",
    "status": "fail"
}
HTTP/1.1 400 Bad Request
Content-Type: application/json; charset=utf-8
Vary: Accept-Language, Cookie
Content-Language: en
Date: Sat, 05 Feb 2022 16:11:05 GMT
Strict-Transport-Security: max-age=31536000
Cache-Control: private, no-cache, no-store, must-revalidate
Pragma: no-cache
Expires: Sat, 01 Jan 2000 00:00:00 GMT
X-Frame-Options: SAMEORIGIN
content-security-policy: report-uri https://www.instagram.com/security/csp_report/; default-src 'self' https://www.instagram.com; navigate-to 'none'; object-src 'none'; form-action 'none'; base-uri 'none'; upgrade-insecure-requests; sandbox; img-src https://*.giphy.com
cross-origin-embedder-policy-report-only: require-corp;report-to="coep"
report-to: {"group": "coep", "max_age": 86400, "endpoints": [{"url": "/security/coep_report/"}]},{"group": "coop", "max_age": 86400, "endpoints": [{"url": "/security/coop_report/"}]}
origin-trial: xxx
cross-origin-opener-policy: same-origin-allow-popups;report-to="coop"
X-Content-Type-Options: nosniff
X-XSS-Protection: 0
x-ig-push-state: c2
x-aed: 48
x-ig-set-www-claim: xxx
Access-Control-Expose-Headers: X-IG-Set-WWW-Claim
x-ig-request-elapsed-time-ms: 663
ig-set-ig-u-ig-direct-region-hint: 0
ig-set-ig-u-ds-user-id: xxx
x-ig-origin-region: xxx
X-FB-TRIP-ID: xxx
X-FB-Client-IP-Forwarded: x.x.x.x
X-FB-Server-Cluster-Forwarded: arn2c01
Alt-Svc: h3=":443"; ma=3600,h3-29=":443"; ma=3600
Content-Length: 73
Connection: keep-alive

{"message":"server processing error: um_request_failure","status":"fail"}
Valew17 commented 1 year ago

Hello! Were you able to resolve this issue with um_request_failure?

xiaomiwang commented 1 year ago

this is maybe the problem with upload video. you should upload video with 'Content-Type': 'video/mp4'

pedroentringer commented 10 months ago

up