function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Pratap R ReddyPratap R Reddy 

.NET - Salesforce REST API - How to login with just user name and password (just like DataLoader or Workbench)

Hello,
I have created a sample framework using the Salesforce REST API and .NET (C#). For authenticating the user, i need to provide the username, password and the security token. I have used Data loader and workbench that does not require the security token. We can avoid the security token by adding the IP addresses in the Network Access under user's Setup. But with Data loader (or Workbench), the security token are not needed at all even though the IP address is not provided in network access for the user. How can i achieve the same behaviour for my sample framework?

Thanks in advance,
Pratap
Daniel BallingerDaniel Ballinger
Workbench will be using an alternative OAuth Flow so as to not require direct passing of the credentials. Likely they are using the Web Server (https://developer.salesforce.com/page/Digging_Deeper_into_OAuth_2.0_on_Force.com#Obtaining_an_Access_Token_in_a_Web_Application_.28Web_Server_Flow.29)flow.

See OAuth 2.0 on Force.com (https://developer.salesforce.com/page/Digging_Deeper_into_OAuth_2.0_on_Force.com#OAuth_2.0_on_Force.com) for alternative flows.