2 weeks ago
Hi Team,
I am new to the Workato platform and currently working on an HTTP call using Basic Authentication. I tested the same request in Postman, and it worked fine. However, when I try to make the call in Workato, I’m encountering errors.
When I include the username and password in the connection, I receive a 400 error:
“The server cannot or will not process the request due to a client error (for example, incorrect syntax or missing headers).”
When I include the credentials as a header, I receive a 401 Authorization error.
Could you please help me identify what might be causing this issue and how to properly configure the connection in Workato?
Thank you for your support. 
a week ago
Hi @Aiswarya
As mentioned by @shivakumara & @rajeshjanapati , the connection itself must be established first. You said you already attempted that and received a 400 error. That status simply means the server accepted the request structure, but the body, payload, or query parameters were incorrect, so it rejected the request.
If you still plan to send the Username and Password in the headers, remember that Workato will flag sensitive data. You’ll need to store those values in a variable first and then reference that variable in the header. Normally this wouldn’t be necessary if the authentication is properly configured through the HTTP connector’s connection settings.
a week ago
Hi Dinesh
Thanks for the advice.
Just to confirm — I have already resolved the issue on my side. The screenshot I shared earlier was only from my initial testing phase, where I was checking whether the connection and token retrieval were working correctly. That’s why the test token appeared in the image.
The connection is now established successfully, and I’m receiving the expected results.
Appreciate the support and suggestions from everyone.
2 weeks ago - last edited 2 weeks ago
Hi @Aiswarya ,
When passing Basic Authentication details through headers, you need to encode the username and token in Base64 format before sending them.
For example, if your username is api-token and
your token is 23r6acd57f95a6fb4be8ad675a0597d94bff63f8e5ad913b0a797237b7asdfg,
you should combine them in the format username:token and then encode this string in Base64.
The resulting Base64 value will be your converted token.
Follow this token conversion once and you can use it later for authentication.
You can then include it in your API request header as follows:
Authorization: Basic <Base64-encoded-token>
Using this format should allow you to successfully authenticate and access the API.
2 weeks ago
Hi Team,
Thank you all for your responses. I tried all the suggested methods, but unfortunately, they didn’t work. I eventually connected with the Work to team, and they were very supportive in helping identify the issue. It turned out that the data needed to be passed through the header with the content type including "star slash star".
Thank you again for all your support and effort. I truly appreciate the quick responses and the time you all took to help. I was testing each of your suggestions from my side as well, and I’m very grateful for the guidance.
Regards,
Aiswarya
2 weeks ago
Hi @Aiswarya ,
Happy that you are able to proceed.
The above suggestions are based on our use case, however, we were not aware of what your endpoints expect. As a small suggestion, next time when raising a question, please provide some context and background about the API endpoint.
Thanks and Regards,
Shivakumara K A