I have the following CURL command to upload file into browser stack custom media. I want to make this process automated. Can I use REST API to do the same?
Like -u is basic authentication in REST API, -F is to update a HTTP form request from a file. Should I pass file name as query param?
---> curl -u "USERNAME:PASSWORD" -X POST "https://api-cloud.browserstack.com/automate/upload-media" -F "file=@\file\TEST.xlsx"
I tried to pass file name as query param and also as json body, I am only getting 401 unauthorized error. But GET and DELETE APIs work with same username and password.