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

Web Services

Hi Friends,


Consumer Key
Consumer Secret

I need to know,for example, when I register some website in the remote setting in salesforce in order to make callouts.
Consumer Key means what Does it belongs to salesforce or the website which was registered in salesforce.

Is it same about consumer secret.
Can somebody please explain with an example ?.






Consumer Key = A value used by the Consumer to identify itself to the Service Provider.

Consumer secret = A secret used by the Consumer to establish ownership of the Consumer Key.


They can be used in providing secure access to one org to other app. They are used widely in Authentication process. Here is a small code to show how they can be used in OAuth.


 public OAuth2_0Test()






        url = ''+consmer_key+'&redirect_uri='+redrct_uri+'&scope=full';


        HttpRequest req = new HttpRequest();



        Http http = new Http();

        HTTPResponse res = http.send(req);

        response=res.getBody() ;





Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved. 




Hi Navatar_dbSup.


Thanks a lot for your reply .


My scenario is like this.I have  salesforce customer portal and on that portal I have link on which when we click it takes you to some other web site.

In this scenario,Who is going to be the service provider and who is going to be the consumer.Can u please explain that?

In my opinion ,customer portal seems to be the consumer and that site which will be called through some other rest based web service will be the provider.Please correct me if I am wrong.

if I am correct ,do I need to register that website in remote settings and then generate client id and consumer id and then Who is going to use those ID's and How ?

Please ignore my ignorance I know  i am asking some very basic questions.

What is the difference between URL and redirect_uri. ?

If u know how I can do this some portal to the web site, please help me.I mean some basic steps will give me a start.

I wil really appreciate your quick responsse.Any sort of help here will be highly appreciated?