Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@richardvanhook
richardvanhook / ApexOrg2Org
Created September 27, 2011 13:43
Apex code demonstrating how to log in from one salesforce org to another
/*
======================================================================
The following apex code demonstrates logging into another salesforce
org via the SOAP/XML web service api and then using session id to
query the standard REST API as well as the Chatter REST API.
To run this code, simply copy and paste into execute anonymous,
then replace the value of the first three variables accordingly.
NOTES:
(1) You'll need to create a remote site setting for both the login