Jilji
Jilji

Reputation: 254

Salesforce token, SOAP VS REST

Currently, I am using SOAP to access the token, this can be done with my user ID and password,without client Key and secret.

binding.login(USERNAME, PASSWORD + "");

Is there a way to do the same with REST , ie access the token only with ID and Password?

Something like,

         string URI = "https://login.salesforce.com/services/oauth2/token";

         StringBuilder strbody = new StringBuilder();   

         strbody.Append("grant_type=password&");

         strbody.Append("username=" + "xxx" + "&");   

         strbody.Append("password=" + "xxxx");   

Upvotes: 0

Views: 219

Answers (1)

superfell
superfell

Reputation: 19040

No, OAuth requires you to have a consumer key, even for the username/password flow.

The requirement to have a consumer key isn't onerous, you can create one in your developer edition org, and its automatically available to all organizations & users.

Upvotes: 2

Related Questions