0

I'm trying to run the following script. It returns an "unauthorized 401 error". If I execute an corresponding curl request it gets executed correctly.

import requests
import json
url =  "https://api.box.com/2.0/users/"
data = {'Authorization': 'Bearer Access_token'}
payload = json.dumps(data)
r = requests.get(url, data=payload, verify=False)
print r.url
print r.text
print r.json
Justin Fay
  • 2,520
  • 1
  • 19
  • 26
Nitesh Selkari
  • 1,077
  • 2
  • 8
  • 10

0 Answers0