Get Session Id using Apex in Salesforce

String sessionId = UserInfo.getSessionId();

Leave a Reply