DEV Community

Austin Spivey for Wia

Posted on

Upload a file to Wia via Postman

In this tutorial, you're going to learn how to upload a file to Wia via postman. Postman is the only complete API development environment, for API developers, used by more than 5 million developers and 100000 companies worldwide. Postman makes working with APIs faster and easier by supporting developers at every stage of their workflow, and is available for Mac OS X, Windows, and Linux. With postman, you can easily test any photo based flow you may have.

if you haven't already, you'll need to have a device setup with Wia and obtain a device secret key for the device, a tutorial showing you how to complete is here

DOWNLOADING POSTMAN

To download postman, click here and follow the steps for you chosen platform.

Uploading your file

  • Open the postman app and enter the url: https://api.wia.io/v1/events
  • Click POST as the type of http request
  • In the Authorization tab, click the drop for type and set it to Bearer Token
  • Add your device secret key you obtained earlier in the right hand side of the screen

alt text

Now in the body tab:

  • Click on form data radio button
  • Add a name key and enter name of you event ( I'm calling mine photo as i'm uploading a photo)
  • Add a file key and and the hover to the end of key box to select file instead of text.
  • A Choose Files tab will be added to the value section adjacent, this is where you can choose your file alt text

Click on the blue Send button and head to your wia debugger to see the output
alt text

Top comments (1)

Collapse
 
divyanidon profile image
divyanidon

hey how to get device secret key ?