I am trying to create tickets using postman or python , but i get back this error as follows
from http.client import HTTPSConnection
import json
from base64 import b64encode
#This sets up the https connection
c = HTTPSConnection("midwichhelpdesk.freshservice.com")
#we need to base 64 encode it
#and then decode it to acsii as python 3 stores it as a byte string
userAndPass = b64encode(b"tazeen_86@hotmail.com:Tazeen86!").decode("ascii")
headers = {"Content-type": "application/json",
"Accept": "application/json", 'Authorization' : 'Basic %s' % userAndPass }
data={
"name" : "Taz",
"requester_id":1,
"email": "tazeen_86@hotmail.com",
"phone":"+61452418384",
"status":2,
"priority":3,
"source":1
}
json_data = json.dumps(data)
#then connect
c.request('POST', '/api/v2/tickets',json_data, headers=headers)
#get the response back
res = c.getresponse()
# at this point you could check the status etc
# this gets the page text
data = res.read()
print(data)