when trying to import users, it fails with the below error, can you please point to what am doing wrong here ?
ERROR recieved :
{“statusCode”:400,“error”:“Bad Request”,“message”:“Users file must not be empty”,“errorCode”:“operation_not_supported”}
Contents of the python script to import users are as below :
ubuntu@ip-10-0-1-209:~/Auth0$ cat import.py
import http.client
conn = http.client.HTTPSConnection(“.auth0.com”)
payload = “-----011000010111000001101001\r\nContent-Disposition: form-data; name="users"; filename="/home/ubuntu/Auth0/users.json"\r\nContent-Typ
e: text/json\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name="connection_id"\r\n\r\ncon_gV9jDmRljFESONiB\r\n-----011000010
111000001101001\r\nContent-Disposition: form-data; name="external_id"\r\n\r\nEXTERNAL_ID1\r\n-----011000010111000001101001–\r\n”
headers = {
‘authorization’: "Bearer ",
‘content-type’: “multipart/form-data; boundary=—011000010111000001101001”
}
conn.request(“POST”, “https://auth0.com/api/v2/jobs/users-imports”, payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode(“utf-8”))