I am trying to build Salesforce to Salesforce integration using Named Credentials.
Followed steps from below blog.
- Created Connected App in destination org
- Created Authorization Provider in source org
Defined Named Credential in source org.
HttpRequest feedRequest = new HttpRequest(); feedRequest.setEndpoint('callout:Dev3Org/services/data/v32.0'); feedRequest.setMethod('GET'); Http http = new Http(); HTTPResponse feedResponse = http.send(feedRequest);
When I ran above code in Source Org (anonymous window) then am getting below error
Session expired or invalid