Help me figure it out, the token is there, the call does not accept the header.
C:
using (var client = new HttpClient())
{
var url = "https://10.40.100.95:8006/api2/json/nodes";
client.DefaultRequestHeaders.Add("Authorization", "PVEAPIToken=test@pve!TOKENID=ddf5959760540181d171d2e2a7adcba4");
var response = await client.GetStringAsync(url);
var settings = new JsonSerializerSettings
{
NullValueHandling = NullValueHandling.Include
};
dynamic stuff = JsonConvert.DeserializeObject(response, settings);
Console.WriteLine(stuff);
Console.ReadLine();
}
FormatException: The format of value 'PVEAPIToken=test@pve!TOKENID=ddf5959760540181d171d2e2a7adcba4' is invalid.
Last edited: