I am new to ArcGIS. I would like to know where I could find the service URL to list all the items in the MyContents tab which could be found by logging into my organization's ArcGIS URL. I want to do this using the Javascript or Rest API provided by ArcGIS.
I was able to get Token from ArcGIS using
https://www.arcgis.com/sharing/rest/oauth2/token
this URL.
When I try to upload a file to one of the sample servers using Code, I am not able to do it. It works in postman though.
These are the code that I used for uploading a file to a sample server which failed.