1
I have a code to log in, but when I send the correct data the API continues to send the code "Unauthorized".
The code is as follows::
var client = new RestClient("link");
var request = new RestRequest("/v1.5/auth/authenticate", Method.POST);
request.RequestFormat = DataFormat.Json;
string user = "{\"nif\":\"15551\", \"nome\":\"teste\", \"password\":\"teste2\", \"loja\": 17 }";
request.AddParameter("text/json", user, ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Taking a look at the Restsharp documentation, shouldn’t you use the Addbody() method to add your json? This Addparameter is a little weird with this "text/json".
– André Luis Marmo