Skip to content

Instantly share code, notes, and snippets.

@hujia0601
hujia0601 / ApexOrg2Org
Created June 15, 2012 08:27 — forked from richardvanhook/ApexOrg2Org
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