0

How to connect to a salesforce org to another salesforce org using web based login and without a connected app.

I want to connect to sandbox orgs from prod org and do not want to create connected apps. Is there a way we can login using the web based login flow ?

After creating names credential as @sfdcfox mentioned below, I get the Unauthorized access, 401 error. I used the named credential as follows

String restUrl = 'callout:TestNamedCredential/services/data/v42.0/limits';
Http h = new Http();
HttpRequest req = new HttpRequest();
req.setEndpoint(restUrl);
req.setMethod('GET');
    Http h = new Http();
    HttpRequest req = new HttpRequest();
    req.setEndpoint(restUrl);
    req.setMethod('GET');
    req.setBody('UserName:{!HTMLENCODE($Credential.Username)}');
    req.setBody('Password:{!HTMLENCODE($Credential.Password)}');

HttpResponse res = h.send(req);
1

Check this article(Connecting one Org to another via Rest API) : https://cloudvista.wordpress.com/2015/07/23/connecting-one-salesforce-org-to-another-via-rest-api/

Note: this uses connected App but has all step by step details

  • I am looking for solution which does not involve connected apps. I want to connect to n number of sandboxes from prod – ab0369 Dec 24 '18 at 23:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.