kushan.kjk kushan.kjk - 7 months ago 45
Linux Question

curl authentication failed in rest api

I'm currently trying to authenticate REST api using curl request.
but it gives error http 400 bad request for my curl request.

This is the curl request i'm used

curl -k -v -X POST -H "Content-Type: application/json" --data-binary @auth.txt https://example.com/vedsdk/Authorize/

auth.txt file contain credential for rest api.

auth.txt file contain


This Api_Account is a local account for REST Api platform.

Can anyone tell me where I'm wrong in this..


Found out the solution. add another back slash (\) in password

{ "Username":"Api_Acconut", "Password":"8+\\Kt\\P;Z" }