# I am getting 200 while importing contacts with empty response

**URL:** <https://community.hubspot.com/t/i-am-getting-200-while-importing-contacts-with-empty-response/76831>\
**Category:** APIs & Integrations\
**Tags:** contacts\
**Created:** [March 9, 2023, 11:29am UTC](https://community.hubspot.com/t/i-am-getting-200-while-importing-contacts-with-empty-response/76831 "2023-03-09T11:29:05Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![RKhan282](https://avatars.discourse-cdn.com/v4/letter/r/45deac/32.png) [@RKhan282](https://community.hubspot.com/u/RKhan282)\
**Post date:** [March 9, 2023, 11:29am UTC](https://community.hubspot.com/t/i-am-getting-200-while-importing-contacts-with-empty-response/76831/1 "2023-03-09T11:29:05Z")

</div>

`import requestsimport jsonimport osurl = "http://api.hubapi.com/crm/v3/imports"headers = { 'authorization': 'Bearer %s' % 'pat-na1-NOPE', 'content-type': 'multipart/form-data'}full_path = os.path.abspath("Sample.csv")print(full_path)data = { "name": "November Marketing Event Leads", "files": [{ "fileName": "Sample.csv", "fileFormat": "CSV", "dateFormat": "DAY_MONTH_YEAR", "fileImportPage": { "hasHeader": True, "columnMappings": [ { "columnObjectTypeId": "0-1", "columnName": "first_name", "propertyName": "First Name", "idColumnType": None }, { "columnObjectTypeId": "0-1", "columnName": "last_name", "propertyName": "Last Name", "idColumnType": None }, { "columnObjectTypeId": "0-1", "columnName": "email", "propertyName": "Email", "idColumnType": None }] } } ]}datastring = json.dumps(data)payload = {"importRequest": datastring}current_dir = os.path.dirname( __file__ )# relative_path = "./test_import.csv"files = [('files', open(full_path, 'rb'))]print(files)response = requests.request("POST", url, data=payload, files=files, headers=headers)print(response.text.encode('utf8'))print(response.status_code)`

 ![RKhan282_0-1678361271946.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/9/8/98cab4b10a2754970f17c24f90417ee7794d9ae4.png)

 ![RKhan282_1-1678361301280.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/4/2/423b279bbbe707432ad50f71a0ce4f5e6d48e50d.png)

---

<div class="post-metadata">

**Author:** ![Jaycee\_Lewis](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jaycee_lewis/32/61352_2.png) [@Jaycee\_Lewis](https://community.hubspot.com/u/Jaycee_Lewis)\
**Post date:** [March 9, 2023, 9:13pm UTC](https://community.hubspot.com/t/i-am-getting-200-while-importing-contacts-with-empty-response/76831/2 "2023-03-09T21:13:56Z")

</div>

Hi, @RKhan282 👋 Thanks for posting. PLEASE PLEASE PLEASE be careful and make sure you remove your Authorization tokens from public posts before hitting the submit button. I edited your post to remove your Private App details. And you should strongly consider rotating your key ASAP.

To your question, are you saying that you’re getting the empty 200 response and Contacts **are** created? Or that, you’re getting the empty 200 response and Contacts **are not** created?

Thank you,

Jaycee

---

<div class="post-metadata">

**Author:** ![RKhan282](https://avatars.discourse-cdn.com/v4/letter/r/45deac/32.png) [@RKhan282](https://community.hubspot.com/u/RKhan282)\
**Post date:** [March 10, 2023, 11:23am UTC](https://community.hubspot.com/t/i-am-getting-200-while-importing-contacts-with-empty-response/76831/3 "2023-03-10T11:23:55Z")

</div>

I am getting the empty 200 response and Contacts **are not** created.
