Configuration
Authentication by token ( Access Token ) or basic ( Access Password ) must be enabled by clicking on Manage and then on API.

The token is created by clicking Profile and then Access token:

For it to work you will have to set ticket.agent to permissions.