I want to access an API for a purchased product, I used the following code according to the product documentation:
var client = new RestClient("http://example.com/api/login");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddParameter("username", "admin");
request.AddParameter("password", "admin");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
The documentation says:
Authentication is performed via JWT Bearer Authentication. Every endpoint requires authentication, so you will need to add the following header to each request
Authorization: Bearer <JWT>
How can I add the JWT authentication in my upper request?