2

When I upload an image to Imgur, it goes to my account; even in the album I specify but stays hidden.

I went to https://apidocs.imgur.com/

It makes me open postman, I did tests.

I selected "POST IMAGE UPLOAD"

I insert in Header section Authorization Bearer {{token}}
The album hash, title, description.

It gives me this code:

<?php

$request = new HttpRequest();
$request->setUrl('https://api.imgur.com/3/image');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders(array(
  'Postman-Token' => 'dbbf023e-642e-493a-9fe2-e57f61680068',
  'cache-control' => 'no-cache',
  'Content-Type' => 'application/x-www-form-urlencoded',
  'Authorization' => 'Bearer {{token}}',
  'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW'
));

$request->setBody('------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="image"

R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7
------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="album"

ZTgISJ7
------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="title"

title test
------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="description"

descri
------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="image"

{{umg url}}
------WebKitFormBoundary7MA4YWxkTrZu0gW--');

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}

But no matter what I try, the image stays hidden.

Is it possible to upload an image via this method and the image becomes a public post? (By public post I mean the button called "Share to community")

Thanks.

Meraj al Maksud
  • 1,528
  • 2
  • 22
  • 36
Jintor
  • 607
  • 8
  • 32
  • same is there a solution? – OuzKagan Jul 25 '21 at 12:52
  • 1
    @OuzKagan not that I know of... less popular social networks like imager, Tumblr have the same kind of issue, they prefer "real humans" with posts with "real" interaction.... – Jintor Jul 26 '21 at 14:55

0 Answers0