I’ve gotten a lot of questions about using Basic Authentication with the Web Integrator in TIBCO Cloud Integration. Turns out it’s pretty straightforward.
When you’re using an InvokeRESTService activity in Web Integrator the tab Input Settings has section called Request Headers and in that table you can specify the HTTP headers you want to use. To add a header parameter, click the + button and press Enter to save your changes. For HTTP Basic Authentication you need to specify the header Authorization.
HTTP Basic Authentication passes the word Basic: (and a space) followed by a Base64-encoded string of the username and password. For example, Basic: dXNlcjpwYXNz is the value you’d use if the username/password was user:pass. In Web Integrator you can build this expression using the mapper. The expression on the Input tab for the above scenario would be string.concat("Basic: ", string.stringToBase64("user:pass"))
If you want to verify what headers your request is actually sending, RequestBin is a handy tool. RequestBin is a community project from Runscope that lets you inspect HTTP requests and debug webhook payloads. You can also host RequestBin yourself following the steps on GitHub.