I'm getting a 500 status code back in visual studio for an api shown below although when using PostMan with the same credentials I get a json response back saying the token has expired. Is this because I'm not seeing the response back as json or something? Obviously I need to handle if the token has expired so getting 500 back is not sufficient. Many thanks,
Code failing with status code 500
Same call but using PostMan