not able to get handle for doc uploading

I'm trying to use python to upload a file to workfront, according to the userguide, I should get a 'handle' when I sent a post request to /attask/api/v15.0/upload, but I only got a response 401 "com.attask.common.AuthenticationException". I found "uploadedFile" is necessary for the request, I tried but still return 401. could anyone help to provide a python example of how to upload a file? MANY THANKS!!!!
Here is the code I used.
dest = self.domain_url+'/attask/api/upload'
params['uploadedFile'] = filename
files = [('uploadedFile', open(filename,'rb'))]
response = requests.post(dest, data = params, files = files)