Web Services with Basic Authentication (username:password)

I am trying to set up a Web Services Connector with Basic Authentication, but Test Connection is failing with Header set as
Authorization : $application.accetoken

Getting 401 error and I see inside source json "accesstoken": null

Any idea what am I missing?

Hi Nitesh
Try with below
Use the built-in Basic Authentication (recommended)
In the source Authentication Type, select Basic Authentication.
Fill Username and Password.
Remove any custom Authorization header from HTTP Operations.
Save, then Test Connection.
When you choose Basic Auth, the connector automatically sends Authorization: Basic <base64(username:password)> for you. No token variables are involved.

you used Authorization : $application.accetoken (typo + wrong concept). The source JSON shows “accesstoken”: null, so the header becomes Authorization: null, which any API will reject with 401 Unauthorized.

Please share a screenshot of your Connection → Authentication tab and one of your HTTP Operation headers
Regards

Sathishkumar.N

Can you please try in POSTMAN as well? Also, the response variable which you provided is incorrect. It should be “$application.accesstoken“ or “$application.AccessToken” as per the Token Generation API.

Hi Rohit,
It works in Postman

Thanks @sanatar
It worked when I removed the custom Auth from the header. Appreciate your response.

And typo was just here. :slight_smile: