Change Authenication Email

How do I change authenication email for firebase using rest api. I’ve tried it but I keep getting invalid idToken error.

I figured it out. I feel silly lol. All I had to do was download the Get ID Token flow function and use it to retrives the IdToken then follow the steps in the firebase documentation.