保管箱中有 python 个请求的无效请求

Invalid requests in dropbox with python requests

我尝试通过 Dropbox 文档提出请求,得到了这个:

urlToken = 'https://api.dropbox.com/1/oauth2/token'
headers = {
                'code': input(),
                'grant_type': 'authorization_code',
                'client_id': '#############',
                'client_secret': '######',
                'redirect_uri': 'https://localhost'
    }
request = requests.post(urlToken, headers=headers)

输出:

{"error_description": "No auth function available for given request", "error": "invalid_request"}

request = requests.post(urlToken, data=headers)