Hi,
I'm trying to create an anonymous request using this article https://developer.zendesk.com/rest_api/docs/support/requests#create-request
I reach the /api/v2/requests.json fine, I use No auth.but I keep getting this error:
{
"error": "RecordInvalid",
"description": "Record validation errors",
"details": {
"base": [
{
"description": "Name: cannot be blank",
"error": "BlankValue",
"field_key": 28679625
},
{
"description": "Organisationens navn: cannot be blank",
"error": "BlankValue",
"field_key": 22892244
},
{
"description": "Organisationens CVR-nummer: cannot be blank",
"error": "BlankValue",
"field_key": 23057730
},
{
"description": "Reference person (til fakturering): cannot be blank",
"error": "BlankValue",
"field_key": 22993550
},
{
"description": "Hvilket miljø drejer henvendelsen sig om: cannot be blank",
"error": "BlankValue",
"field_key": 22993570
}
]
}
}
Here is my JSON payload:
{
"request": {
"requester": {"name": "Anonymous customer"
},
"subject": "Help!",
"comment": {
"body": "My printer is on fire!",
"upload": [
"5v3Bu2ZhHqTdcRK80PnsJ2XuT"
],
"Custom_fields": [
{
"id": 28679625,
"value": "Oprettelse"
},
{
"id": 22892244,
"value": "e-Boks"
},
{
"id": 23057730,
"value": "12345678"
},
{
"id": 22993550,
"value": "NA"
},
{
"id": 22993570,
"value": "environment_produktion"
}
]
}
}
}
As soon as I use basic auth, with the same payload, I don't get the error, and a request is created, all thou none of the fields from the payload is filled out.
I have already checked zendesk is setup like below
- Enable "Anyone can submit tickets"
- Disable "Ask users to register"
What am I missing?