I need to make an api call with api key in django ,this works in postman :
i have tried it in python :
header={"content-type": "application/json","Authorization": "X-Api-Key %s" %(self.api_key)}
r = requests.post(email_meta_path,json=json,header=header)
but i got authentication credintionals error , how can i create the postman request in python ?
CodePudding user response:
You could use the code snippet option in Postman (Located on the right-hand side, usually minimised);
Select the language you want to use and it should give you the code from your request;