Closed Awakumori closed 1 month ago
So, there are 2 things : access key and access token.
As such, you need to get the access key then use the login endpoint to get the access token from the access key (see https://github.com/Aedial/novelai-api/blob/main/novelai_api/_high_level.py#L61). From what I can see, you're trying to use your email to get the access token.
Thank you for your reply. In your reply, you pointed out that I should not use email to get the access token. However, I followed the instructions in the README file. According to the README file, getting the access token and getting the access key use the same parameters, i.e. [username,password]. Please check the image.
Yes, indeed. Been a while I used these and I forgot. It's indeed login and password.
If your password contains special characters (like '\'), you might need to escape them, because of the terminal. This is, however, not an issue when calling the login from code itself, it's a terminal quirk.
Hello,
I tried logging in with my email and password, and it worked successfully when I used python -m novelai_api access_key. However, when I used the same email and password with python -m novelai_api access_token, it always failed, returning the error novelai_api.NovelAIError.NovelAIError: https://api.novelai.net/user/login (401) - Incorrect access key.
This confuses me a lot: I used the same email and password, but got completely different results.
Please check the image attached.