How to get Session Id using Apex in Salesforce?
To get Session Id using Apex in Salesforce, UserInfo.getSessionId() is used. Sample Code: String sessionId = UserInfo.getSessionId(); Note: For Apex code that is executed asynchronously, such as @future methods, Batch Apex ....