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
Vipul Agnihotri 17Vipul Agnihotri 17 

Getting Invalid Session Id on password reset from custom Community login page.


I am having a custom community login page.
The login function is working properly but when i try to reset the password using System.resetPassword(userId , true). I am getting following exception.
System.UnexpectedException: INVALID_SESSION_ID: This session is not valid for use with the API
The context user is the Site guest user.

This is working in Developer Sandbox orgs. But not in full copy sandbox.
Pramodh KumarPramodh Kumar
I am having the same issue do you have a solution for this. I am just using  System.setPassword in apex method 
Nestor VelázquezNestor Velázquez

I am having the same issue do you have a solution for this. I am just using  System.setPassword in apex method with @AuraEnabled