+ Start a Discussion
SUSHEELA KUCHIMANCHISUSHEELA KUCHIMANCHI 

HOW TO CALL REST API FROM BATCH

httpResponse [{"message":"Session expired or invalid","errorCode":"INVALID_SESSION_ID"}]
I am getting this error when I am making a rest API callout from execute batch apex.
Where as if I make the Rest api callout from Anonymous window I am not getting any error.
Can any one tell me if  the Session ID be different for Rest api call out from Batch and Anonymous window.
NagendraNagendra (Salesforce Developers) 
Hi Susheela,

Sorry for this issue you are encountering.

May I suggest you please check with below link from stack exchange community which will help you further with the above issue. Please let us know if this helps.

Kindly mark this as solved if it's resolved.

Thanks,
Nagendra