Mathieu2301 / TradingView-API

📈 Get real-time stocks from TradingView
1.31k stars 307 forks source link

"Wrong or expired sessionid/signature" Consistently over and over again, tried fixes. #221

Open tinguy1 opened 7 months ago

tinguy1 commented 7 months ago

Describe the bug Functions that use session_id and sessionid_sign do not work for me even with fresh session and auth, it always says "Wrong or expired sessionid/signature" in the console, this happens in the "getUser" function, I have made sure 100 percent that the tokens are correct, are not expired and are what is asked by the function specifically. I am creating the client with auth from web and not the login function as the login function does not work for me (not sure why will look into it).

To Reproduce

tvClient = new TradingView.Client(
    {
        token: '32 char session_id token',
        signature: 'v1 sessionid_sign'
    }
);

Expected behavior To create the client with my account auth

Environment:

tinguy1 commented 7 months ago

I forgot to mention something, this is being tested through a electron application, it works with a simple js file in my downloads folder but when used in a electron app it sends this error, before someone responds I will try to discover a reason and solution for this.