function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
SurekaSureka 

Web service callout failed: WebService returned a SOAP Fault: INVALID_SESSION_ID: This session is not valid for use with the API faultcode=sf:INVALID_SESSION_ID faultactor=

Hi,

I am getting the following exception while making "listMetadata" API Call.

Web service callout failed: WebService returned a SOAP Fault: INVALID_SESSION_ID: This session is not valid for use with the API faultcode=sf:INVALID_SESSION_ID faultactor=

the same code was working fine in other sandbox. While moving to another sandbox, I got the above error. 

Any suggestions?

Thanks

Pramod_SFDCPramod_SFDC
Hi,

It seems like uour web service which is being called from the callout does not have a valid Session ID. You will have to pass the web service a valid Session ID (from the getSessionID UserInfo method), or you will have to have a valid login call from the web service to salesforce.com to generate a new session ID.

Hope the above mentioned information helped you.


Regards
Pramod
SurekaSureka
Hi,

I am using "UserInfo.getSessionId()" to pass the session id. Still got the above error.

Thanks
Charles Naccio 1Charles Naccio 1
I'm also having this issue when trying to use the metadata API... Did you ever figure this out?