Unfortunately, I can’t get any further with the creation of tickets via API (via curl). My message is “{”error“: ‘Not authorized (token)!’, ‘error_human’: ‘Not authorized (token)!’}”. My user is admin and agent, has the right “ticket.agent”. I guess I have to make a setting under “Access Token”, but I can’t find out which point(s) I have to activate. Currently these three items are enabled: TICKET, TICKET_PRIORITY and TICKET_STATE (I tried to activate all points too, but it didn’t work either).
I am currently using this command. API, e-mail and URL are placeholders here:
Create an access token for your purpose in the profile settings for the user that should be used for the API call, and use this token for the authentication.
Exactly. That’s how I read it and that’s how I understood it. My problem is, what should I enter in the access token? There are many checkboxes here that can be ticked. So far I have activated TICKET, TICKET_PRIORITY and TICKET_STATE. I have also activated all of them, but always received the above message.
You’re not reading/understanding the documentation, I guess. You’re using an access token to create a ticket, but why are you trying to authenticate against Zammad as a third-party application?
Unfortunately not :-(. When I use curl -X GET “URL/api/v1/groups/5” -H “Authorization: Token token=API-KEY” I get the infos as json.
But if I try to create a ticket with curl -X POST “URL/api/v1/tickets” -H “Authorization: Token token=API-KEY” -H “Content-Type: application/json” -d ‘{“title”: “Ticket per API”, “group_id”: 5, “customer”: {“email”: “EMAIL”, “firstname”: “Jane”, “lastname”: “Doe”}, “state”: “new”, “priority”: “2”, “article”: { “subject”: “Ticket per API”, “body”: “Dies ist ein Test-Ticket, das per API erstellt wurde.”, “type”: “note”, “internal”: false }}’ I get the massage {“error”:“Not authorized (token)!”,“error_human”:“Not authorized (token)!”}.
I am on the zammad server it self. No 3rd party applications to authenticate against Zammad