I'm building a REST API input using the Splunk Add-On Builder. I'm trying to set up basic authentication for the REST call. However, when base64 encoding the credentials, the input inserts a newline character ("\n") in the middle of the base64 string. This causes an "invalid header value" HTTPError in the script output.
Other than the newline character, the auth string generated matches the working one generated by Postman.
This may have to do with the relatively long username and password used (Account Sid and Access Token for the Twilio REST API), as quick tests with a short username and password on other APIs do not demonstrate the issue.
... View more