You need to sign in to do that
Don't have an account?

Apex -> Login Second User -> Get Session Id
Is there a way to login another user in the apex class, to get the session id of that user. I probably can do it using the soap Login call within apex, passing username and password for the second user, and get the session id. But wondering if there is a shortcut for the same.
Thanks.
Sid
Thanks.
Sid
https://www.salesforce.com/us/developer/docs/api_rest/Content/intro_understanding_username_password_oauth_flow.htm
https://developer.salesforce.com/blogs/developer-relations/2013/02/oauth-for-portal-users.html