Skip to content

Make Selenium Easy

And Keep It That Way

  • Home
  • Share
  • Toggle search form

Postman Tutorial Part 49 – How to Upload an Image Using Postman

Posted on 02/19/2025 By admin

As a part of Postman Tutorial – End to End , in this post, we will learn how can we upload an image using Postman or Perform Upload API testing using Postman.

We will use Upload Image API provided by Imgur API.

If you see Upload Image API documentation, you will need below details to use API:-

You can get client id by Registering at Imgur site. Once you register, you need to Add an App. After that you can see your Client id as below:-

We have below things ready:-

URI:- https://api.imgur.com/3/upload

HTTP Verb :- POST

Client ID :- You know how to get.

Fields in Body :- See above image.

Let’s launch Postman app now and add URI and select POST method. We are expert in that now. If not, refer this article.

There is a different style to pass body to upload API. In normal POST request, we generally pass a JSON body by selecting “row” radio button under “Body” tab. In Upload API, we need to pass body by selecting “form-data” radio button. You can also notice the word “BODY formdata” in API documentation above.

Now you need to pass field values as shown in API documentation:-

Let’s first pass “image” field. Type key as “image” and remove focus from key field to save. 

Now mouse hover on “image” field, You should see a dropdown as below:-

When you click on drop down, you will see two options. Select “File” from that.

Once you select “File“, you will see a button to select image as shown below:-

Now click on “Select Files” control and Select the file. You will see file name as value.

Other fields are optional but we will pass “title” and “description” as below:-

We need to pass Client ID as an Authorization header as per API documentation shown above.

We are all set to upload image now. Click on Send button. You should see the response as below:-

{
    "data": {
        "id": "ZRtByZ0",
        "title": "Make Selenium Easy Logo",
        "description": "It is MSE Logo",
        "datetime": 1574775284,
        "type": "image/png",
        "animated": false,
        "width": 237,
        "height": 144,
        "size": 15031,
        "views": 0,
        "bandwidth": 0,
        "vote": null,
        "favorite": false,
        "nsfw": null,
        "section": null,
        "account_url": null,
        "account_id": 0,
        "is_ad": false,
        "in_most_viral": false,
        "has_sound": false,
        "tags": [],
        "ad_type": 0,
        "ad_url": "",
        "edited": "0",
        "in_gallery": false,
        "deletehash": "yuZFjBukkJlXAPI",
        "name": "",
        "link": "https://i.imgur.com/ZRtByZ0.png"
    },
    "success": true,
    "status": 200
}

You will see a field named “link” in JSON response. WHen you hit the URL in browser, you will see same uploaded image.

You can import above example collection from here. Do not forget to generate your client id and pass in Header tab.

You can find all Selenium related post here.
You can find all API manual and automation related posts here.
You can find frequently asked Java Programs here.

Uncategorized

Post navigation

Previous Post: Java Programs 14: Java Program to Print Fibonacci Series of Given Length Using Recursion
Next Post: Common Mistakes & Best Practices in Selenium

Related Posts

Locators in Selenium Uncategorized
amod mahajan rest assured Uncategorized
ArgumentMissing – Make Selenium Easy Uncategorized
PostmanDemo – Make Selenium Easy Uncategorized
May 15, 2019 – Make Selenium Easy Uncategorized
Frequently Asked Java Program 02: Java Program to Check if Any String is Palindrome Without Using Reverse Method | Make Selenium Easy Uncategorized

Recent Posts

  • Getting Started with Selenium 4: What Is New and How to Upgrade from Selenium 3
  • Manual Testing
  • Baby Steps To Become Efficient Selenium-Java Automation Tester
  • Features of Selenium 4.0.0 Release – Java Binding
  • Part 1: Handling Drop-down Created Using SELECT Tag In Selenium

Recent Comments

No comments to show.

Archives

  • April 2026
  • April 2025
  • March 2025
  • February 2025
  • January 2025
  • December 2024
  • November 2024
  • October 2024
  • September 2024
  • August 2024
  • April 2024
  • March 2024
  • February 2024
  • December 2023
  • October 2023
  • August 2023
  • November 2022
  • September 2022
  • August 2022
  • July 2022
  • May 2022
  • March 2022
  • October 2021
  • April 2021
  • March 2021
  • January 2021
  • December 2020
  • October 2020
  • September 2020
  • August 2020
  • June 2020
  • May 2020
  • April 2020
  • March 2020
  • February 2020
  • January 2020
  • December 2019
  • November 2019
  • October 2019
  • September 2019
  • August 2019
  • May 2019
  • December 2018
  • November 2018
  • October 2018
  • September 2018
  • August 2018
  • July 2018
  • January 2018

Categories

  • Getting Started
  • Uncategorized

Copyright © 2026 Make Selenium Easy.

Powered by PressBook Masonry Dark