In am trying to get an access token to call Salesforce Marketing Api through FuelSDK the code is:
NameValueCollection parameters = new NameValueCollection();
parameters.Add("clientId", "myclientidvalugoeshere");
parameters.Add("clientSecret", "myclientsecretvaluegoeshere");
var client = new ETClient(parameters);
ETFolder folder = new ETFolder();
folder.AuthStub = client;
var response = folder.Get();
return response.Message;
But it's returning:
System.Net.WebException : The remote server returned an error: (401) Unauthorized.
I am not really sure if I am doing it the right way.
What I really want to do is to connect to Salesforce Marketing cloud through FuelSDK C#, using Oauth authentication to get access token for the user and call the resources needed.