def sideLoad(imgURL):
    img = urllib.parse.quote_plus(imgURL)
req = urllib.request.Request('https://api.imgur.com/3/image', 'image=' + img)
req.add_header('Authorization', 'Client-ID ' + clientID)
response = urllib.request.urlopen(req)
response = json.loads(response.read())
return str(response['data']['link'])
How to form an anonymous request to Imgur's APIv3