Here is the Json string printed with Console.Writeline :
{"access_token":"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczpcL1wvYXBpLmRydW1zdGlrLmFwcFwvYXBpXC9sb2dpbiIsImlhdCI6MTYwMzgxNTcxMywiZXhwIjoxNjAzODE5MzEzLCJuYmYiOjE2MDM4MTU3MTMsImp0aSI6InJhU1dJSHBJaWR0YnhjTUUiLCJzdWIiOjQ1LCJwcnYiOiI4N2UwYWYxZWY5ZmQxNTgxMmZkZWM5NzE1M2ExNGUwYjA0NzU0NmFhIn0.aaQoQVKTSMFWCEOMv9psVsMeOJqpC5giLfwZ0Uic444","token_type":"bearer","expires_in":3600}
I want to build a c# object :
public class eltoken
{
[JsonProperty("access_token")]
public string AccesToken { get; set; }
[JsonProperty("token_type")]
public string TokenType { get; set; }
[JsonProperty("expires_in")]
public long ExpiresIn { get; set; }
}
eltoken test = JsonConvert.DeserializeObject<eltoken>(response.Content.ReadAsStringAsync().Result.ToString());
//------------
Console.WriteLine(test.AccesToken);
But I dont uderstand why its empty.

response.Content.ReadAsStringAsync().Result.ToString()- this immediately suggests thatresponse.Content.ReadAsStringAsync().Result.ToString()does not, in fact, evaluate to the JSON that you are thinking of. In many ways, producing a self-contained example usually tells you (like here) where the problem is.