1

I have the below code which i've written after looking over many over modules and questions on stack, but i keep getting back a 500 reponse error when trying to submit an order? the text of the resposne is always something like "Internal sever error" followed by a 13? digit number that is always different

import requests
import json
my_aid = xxxxxxxx
loan_id = yyyyyyyyy
url = 'htpps://api.lendingclub.com/api/investors/v1/accounts/xxxxxxxxx/orders'
header = {'Authorization':*my_AUTH*}
payload = {
                 'aid':my_aid,
                 'orders':[{
                          'loanId':loan_id,
                          'requestedAmount':25.0,
                           }]    
}
resp = requests.post(url,headers=header,data=json.dumps(payload))

any thoughts?

GoBlue_MathMan
  • 1,048
  • 2
  • 13
  • 20

1 Answers1

0

change header to;

header = {'Authorization':myAUTH,'Content-Type':'application/json'}

GoBlue_MathMan
  • 1,048
  • 2
  • 13
  • 20