teamviewer.com link icon
or
Ask The Community

Do you want to enjoy the new TeamViewer user interface for Windows?


Download the new version and let us know what you think about it! 👉 Please click here 👈

Get 401 Unauthorized with Python Request

Ok, maybe I will have more luck with this

I'm tring the following code it is returning 401 Unauthorized. What am I missing? At this point due to the total lack of any documentation , I can only guess. Need documentation!

Thanks Again x2

import requests
from requests.auth import HTTPDigestAuth
import json

url = 'https://webapi.teamviewer.com/api/v1/users?full_list=true'

#401 Unauthorized
headers = {"content-type": "application/json", "Authorization": "Bearer xxxxxxxxxxx"}
r= requests.get(url, headers=headers)
print(r)

Comments