API problem to create Users andTickets

Infos:

  • Used Zammad version: 3.3
  • Used Zammad installation source: (source, package, …) DEB Package
  • Operating system: Ubuntu 18.04
  • Browser + version:

Expected behavior:

  • I try to create a Ticket or a User over API. But i got every Time this.

{
“error”: “authentication failed”,
“error_human”: “authentication failed”
}

This is the API Call:

curl -u 123.456@xxxx.de:Password https://xxx.xxx.de/api/v1/users -H
“Content-Type: application/json” -X POST -d
‘{“title”:“Help me!”,“group”: “Users”,“article”:{“subject”:“some subject”,“body”:“some message”,“type”:“note”,“internal”:false},“customer":"123.456@example.de”,“note”: “some note”}’ https://xxx.xxx.de/api/v1/tickets

Actual behavior:

  • This is the header response
Status 401 Unauthorized
cache-control no-cache
connection keep-alive
content-type application/json; charset=utf-8
date Thu, 23 Apr 2020 10:52:45 GMT
referrer-policy strict-origin-when-cross-origin
server nginx
transfer-encoding chunked
x-content-type-options nosniff
x-download-options noopen
x-failure authentication failed
x-frame-options SAMEORIGIN
x-permitted-cross-domain-policies none
x-request-id 1a561125-0224-4921-b38d-f488d6d83e83
x-runtime 0.017612
x-xss-protection 1; mode=block

Steps to reproduce the behavior:

Your production log might hold usefull information.
Besides, if possible you should always use API tokens.

They’re not just your bestest friends on this planet, but also speedup API requests.

Thanks for your answer.

i tried again and it work better. But if i try to genere a ticket with this api call:

https://123.456.de/api/v1/tickets?’{“title”:“Help me!”,“group”:“Users”,“article”:{“subject”:“some subject”,“body”:“some message”,“type”:“note”,“internal”:false},“customer":"tickettest@123.de”,“note”: “some note”}’

I got this error:

{
“error”: “article hash is missing”
}

what did mean?

Best Reegards

Martin

Please have a look into our documentation:
https://docs.zammad.org/en/latest/api/ticket.html

Your API call is malformed. Sorry, but I can’t teach the fundamentals.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.