While using the highlight command line user is getting the following error during upload.
Highlight CLI base 64 Authentication: com.castsoftware.highlight.RTExceptionWithStatus: Failed to fetch company with id='XXXXX' ... "status":"401","decoded-status":"Unauthorized"
From the logs it can be seen that :
java -XX:+UnlockExperimentalVMOptions -jar /opt/hlt/HighlightAutomation.jar --analyzerDir /opt/hlt/perl --sourceDir /sourceDir --workingDir /workingDir --applicationId XXXXX--companyId XXXXX--basicAuth XXXXXXXXXXXXX --serverUrlhttps://rpa.casthighlight.com/
which results in the following error:
Uploading…
Failed to fetch company with id='XXXXX'
[ERR5] HighlightAutomation --analyzerDir /opt/hlt/perl --sourceDir /sourceDir --workingDir /workingDir --applicationId XXXXX--companyId XXXXX--basicAuth XXXXXXXX --serverUrlhttps://rpa.casthighlight.com/failed with code 5
com.castsoftware.highlight.RTExceptionWithStatus: Failed to fetch company with id='XXXXX'
"status":"401","decoded-status":"Unauthorized"
Workaround or Action Plan
The issue here is with the credentials. The options available are
--basicAuth
Instead of login/password, user can use this option to pass the credentials encoded in base64. "The basicauth parameter had encoded credentials", -basicAuth will be used when username and password are converted to base 64.
--tokenAuth
Alternative to Basic authentication, user can use the --tokenAuth option to pass the OAuth token.
Please refer API/CLI User Token Management
If the user is using the token created from the Highlight GUI, user will need to use the --tokenAuth.
User here is using a 'basicauth' token in the command line, and user generated a Oauth token from Highlight portal, which created the issue. User should have used the appropriate flag which is "tokenauth" instead of the "basicauth" token that the user is using.
The appropriate flag should be used in the command line depending upon whether it is "token auth" or "basic auth".
Additional Resources
CAST Highlight Troubleshooting Guides
CAST Highlight Product Documentation
Zendesk Ticket Number
45945
Comments