Getting an image from Figma to a page using Python

I am trying to access the Figma project using the Python and Figma API. But when you try to log in, you always get an error

   import requests
    r = requests.get('', headers={'X-FIGMA-TOKEN':'SOMETOKEN'}, verify=False)
    print "Status code is: "
    print r.status_code

‘Connection aborted.’, Error (104, ‘Socket closed’)
Has anyone solved this problem?
Maybe there is another way to get data from Figma API