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
Milan SanghaniMilan Sanghani 

Access Salesforce Without Consumer Key and Consumer Secret

Hi, 

For accessing salesforce data we need to set Remote Access setting, and have to pass key ans secret with http requst for generating access token, But is there any way that without set Remote setting and without Key and secret (Just passing salesforce Username and Password) we can access salesforce data?????

IvanVIvanV

Short answer: I think it's not possible.

 

Longer:

Check the bottom of http://wiki.developerforce.com/page/Digging_Deeper_into_OAuth_2.0_on_Force.com ;

I think that the only way to access SF data with a remote app is by using OAuth, and this requires that you send consumer key and secret when authenticating the app, even if you use username/password grant_type.

 

Milan SanghaniMilan Sanghani

But, if i make an appexchange package, users  who are going to install application how thay konw that,

 

what is Consumer key and Secrets?

How to get Key and secrets?

 

 

Jia HuJia Hu
Yes, you can use Username/PWD to access Salesforce data.
You can first login and get the SessionId, and use this SessionId for further request.
IvanVIvanV

If you're not using OAuth 2.0, you can get your data using Session ID. Check http://www.salesforce.com/us/developer/docs/api_rest/Content/quickstart_oauth.htm

 

Note that you can use this approach if you plan to use only your username and password, and that OAuth is more desireable if you plan to let other users use your application to access their SalesForce data.

WEN JIEWEN JIE

Hi,

 

As my understanding, if you want to use OAuth2.0 username-password flow, you need get the user's security_token and add this security_token in your password like this "password+security_token".

 

Thank you!