Upload image to Imgur

POST https://api.imgur.com/3/upload

Upload an image to Imgur under your account

Usage of the Imgur API requires registration of your application. Review documentation for the Imgur API. If you don't already have one, create an Imgur account, and register a new application.

We will be using the image upload endpoint from Imgur.

  • In the Qodex request builder, we've selected the POST method from the dropdown, and entered the https://api.imgur.com/3/upload endpoint in the URL bar.
  • Under the Qodex Headers tab, we've entered an Authorization key with the environment variable of our new access token, accessed via the variable name surrounded by double curly brackets. Running our collection with the corresponding environment template will automatically populate this variable with the value stored in the environment template.

update environment variable

  • Under the Qodex Body tab, we've entered a few body parameters to include in the image upload. For the image key, we will use a URL for an image as the value. We can access the environment variable that we created in the previous request within this collection, by once again using double curly brackets surrounding the environment variable name (e.g. {{spaceUrl}}).

format imgur parameters

Request Body

[{"name"=>"image", "value"=>"{{spaceUrl}}", "datatype"=>"string"}, {"name"=>"title", "value"=>"{{spaceTitle}}", "datatype"=>"string"}, {"name"=>"description", "value"=>"{{spaceExplanation}}", "datatype"=>"string"}]

HEADERS

KeyDatatypeRequiredDescription
Authorizationstring