```
 def get_item_url(itemid, itemtype):
if itemtype=="folder" or itemtype=="FOLDER":
    url = "https://api.box.com/2.0/folders/"+itemid
    headers = {'Authorization' : 'BoxAuth api_key='+apikey+'&auth_token='+auth_token,}
    payload = {'shared_link': {'access': 'Open'}}
    r = requests.request("PUT", url, None, json.dumps(payload), headers)
    print r.content
    return r.content
elif itemtype=="file" or itemtype=="FILE":
    url = "https://api.box.com/2.0/files/"+itemid
    headers = {'Authorization' : 'BoxAuth api_key='+apikey+'&auth_token='+auth_token,}
    payload = {'shared_link': {'access': 'Open'}}
    r = requests.request("PUT", url, None, json.dumps(payload), headers)
    print r.content
    return r.content

```

This is the code that I have to get a item url, either a file or a folder depending on the string passed to the method. But this does not work the Box API always returns a "Invalid JSON" error. Could anyone help me out, I have tried everythin! I tried using double quote, single quotes, putting just 'payload' instead of running it through the json.dumps. I have tried adding it as another header, EVERYTHING but I just cannot get it to work!

I have also tried doing the same requests to httpbin.org/put and this is what I get in return:

```
{
"origin": "10.217.61.17",
"files": {},
"form": {},
"url": "http://httpbin.org/put",
"args": {},
"headers": {
"Content-Length": "",
"Accept-Encoding": "identity, deflate, compress, gzip",
"Accept": "*/*",
"Host": "httpbin.org",
"Content-Type": "",
"Authorization": "BoxAuth api_key=<API_KEY>&auth_token=<AUTH_TOKEN>"
},
"json": null,
"data": ""
}

```