You need to sign in to do that
Don't have an account?

I am new for Integration , Please help me How to establish a connection One Org to another Org by using Rest API Oauth 2 and Consumer Id and consumer Secret
I am new for Integration , Please help me How to establish a connection One Org to another Org by using Rest API Oauth 2 and Consumer Id and consumer Secret .
Could you please give me sample code ......
Thanks in advance
Could you please give me sample code ......
Thanks in advance
One of the ways to Integrate two Salesforce Instances will be using OAuth for session management and using REST API.
Lets Assume you have SalesforceA as Source ORG and SalesforceB as Destination ORG.Now lets assume flow of data is from SalesforceA to SalesforceB Instance
1)For OAuth 2.0 in Destination org(SalesforceB) create a Connected App.To help you configure the Connected App in Destination below screenshot should assist.Callback Url may not be of any significant as we are using User-Name Password flow model.You will obtain client secret, consumer key in this process and one should store in Source org custom object or custom setting
3)Create a Integration User in the Destination org whose credentials you will use to call API from Salesforce Source ORG
4)Use the username,password and security token(Also i would prefer setting password never expires here for integration User) and also client secret and consumer key in a custom object or custom setting (Protected) in Source org.
The below code is sample code to get authenticated and how to use access token to further make any API call To deserialize the initial response here is wrapper class the above code uses
For detailed explanation along with screenshots please check with below blog.
- http://amulhai.blogspot.in/2015/11/salesforce-to-salesforce-integration.html
Please mark this as solved if the information helps.Regards,
Nagendra.
This will help you for sure.Here rest api integration is performed by taking example of two salesforce system.
https://www.sfdc-lightning.com/2019/01/salesforce-rest-api-integration.html
Can you please explain me how to fetch or query these values.
I need to create custom settings and store that destination org values and fetch the result or other way can you please tell me
Settings__c ts=settings; //Here write a sample query or fetch from custom settings the consumer ,client secret and username and password of destination org
String clientId = ts.ConsumerKey__c;
String clientSecret = ts.Client_Secret__c;
String username=ts.Username__c;
String password=ts.Password__c+ts.SecurityToken__c;