If you're trying to trigger a Jenkins job using the CLI and get the following errors:
curl -H "Authorization: token abcdefg" .....
Authentication required
401 Error
You should chceck if you are using a Matrix Security, if so you should authenticate using a user:
curl --user <username>:<api_token> ....