Отправляю запрос следующего содержания:
POST https://i.instagram.com/api/v1/upload/photo/ HTTP/1.1
Host: i.instagram.com
Accept: */*
X-IG-Capabilities: 3Q4=
User-Agent: Instagram 10.26.0 Android (18/4.3; 320dpi; 720x1280; Xiaomi; HM 1SW; armani; qcom; en_Us)
Content-Type: multipart/form-data, boundary=08115eb7e9ab4b2d91cbd909da597f68
Accept-Encoding: gzip, deflate, sdch
Accept-Language: en-US
X-IG-Connection-Type: WIFI
Cookie: sessionid=IGSCe75d8682d023c3fb49d8f36d6b3baaa1d65fb1de6ec3a2e60093609dc641736b%3AZysYKn402331ai9xkWQurrCSdvV4sW5g%3A%7B%22_auth_user_id%22%3A5967392865%2C%22[...]
Connection: close
Cookie2: $Version=1
Content-Length: 76564
--08115eb7e9ab4b2d91cbd909da597f68
Content-Disposition: form-data; name="upload_id"
1505336507000
--08115eb7e9ab4b2d91cbd909da597f68
Content-Disposition: form-data; name="_uuid"
08115eb7e9ab4b2d91cbd909da597f68
--08115eb7e9ab4b2d91cbd909da597f68
Content-Disposition: form-data; name="_csrftoken"
uHAooP90MsX2WM5ezH697IJFTjFaZURR
--08115eb7e9ab4b2d91cbd909da597f68
Content-Disposition: form-data; name="image_compression"
{"lib_name":"jt","lib_version":"1.3.0","quality":"87"}
--08115eb7e9ab4b2d91cbd909da597f68
Content-Disposition: form-data; name="photo"; filename="pending_media_1505336507000.jpg"
Content-type: image/jpeg
Content-Transfer-Encoding : binary
FFD8FFE000104A46494600010101006000600000FFE100E645786966000049492A00080000000[...]
--08115eb7e9ab4b2d91cbd909da597f68--
В ответ получаю "HTTP/1.1 502 Bad Gateway".
Коллеги, в чем может быть проблема?