According to some solutions I've seen posted around you might need to instead use
AddParameter()
and provide the parameter name and value for each. So instead of:
request.AddParameter("application/x-www-form-urlencoded", "grant_type=client_credentials&client_id= abc&client_secret=def");
You would do:
request.AddParameter("grant_type", "client_credentials");
request.AddParameter("client_id", "abc");
request.AddParameter("client_secret", "def");
Try giving this a whirl and see whether it works!