realcoloride / node_characterai

Unofficial Character AI wrapper for node.
https://beta.character.ai/
348 stars 74 forks source link

Token Authentication Failure & Server Error 500 #183

Closed Topandhi closed 3 months ago

Topandhi commented 3 months ago

Description When attempting to authenticate using a token, the server returns an "Invalid Token" error. I tried using Postman to check the issue further, but encountered a 500 Internal Server Error. It seems that something may have changed in how tokens are handled.

Steps to Reproduce

Authenticate with a token: Receive "Token is invalid" error: TOKEN INVALID 1

Add log to request variable on client.js and got internal server error 500: LOG RESPONSE

Use Postman to check the token: TOKEN INVALID 0 TOKEN INVALID 4 TOKEN INVALID 3 TOKEN INVALID 2 Encounter 500 Internal Server Error:

Expected Behavior The token should be validated correctly, and the server should not return a 500 Internal Server Error.

Additional Context I suspect there may have been a recent change in how tokens are processed

realcoloride commented 3 months ago

Hello, what version of node_characterai are you using? Because it looks like you are using an outdated version of the package.

Topandhi commented 3 months ago

Thank you for the quick response! I was indeed using an outdated version of node_characterai (version 1.1.0). After updating to the latest version 1.2.7, the issue was resolved, and everything is working fine now. Thanks again for your help!

realcoloride commented 3 months ago

No problem. Feel free to open a new issue if you have a new problem or suggestions. Happy coding!