+ Start a Discussion

Scheduled Apex class call external web service and pass session id


We have a composite application which does some batch processing inside of SF.

Our customers would now like to schedule those batch jobs to run at particular times.

The problem I am having is how will the batch job establish a session with Salesforce.

The only way that I see is if we store the username and password of our users with us which I do not want to do.


Is there any way for our users to schedule an Apex class within SF which invokes a webservice at our end passing in session id so that we can connect to SF?

Or is there any better suggestions on how to achieve the taks without storing the usernames and passwords?




Best Answer chosen by Admin (Salesforce Developers) 

All Answers


Thanks Cory,

I think that will be a better option than asking for usernames and password.

It does not seem as trivial to implement but will give it a try.