How to get session id in @future methods, Batch Apex jobs, or scheduled Apex jobs.
As you know you can not get session id in future method by calling UserInfo.getSessionId() method, if you call this you will get null value, so there are two ways by which you can get the session id…