You have to enable token or basic authentication by clicking on manage and then API.
The token can be created by clicking on profile and then on "access token":
For it to work you will have to set ticket.agent to permissions.