erictik / midjourney-api

MidJourney client. Unofficial Node.js client
Apache License 2.0
1.64k stars 269 forks source link

SALAI Token expires any ideas on how to update the token automatically? #227

Open SaschaHeyer opened 10 months ago

SaschaHeyer commented 10 months ago

the code that reproduces this issue or a replay of the bug

/

Describe the bug

The token that is generated in the browser obviously expires and leads to the following error

Failed to get application_commands for command settings

Does someone have an intelligent idea on how to update the token automatically?

error log

/

codsw commented 10 months ago

Error: SalaiToken are required at (node_modules/midjourney/libs/midjourney.js:16:18)

.env.example

stringsw

SALAI_TOKEN="mytoken" SERVER_ID="myserverID" CHANNEL_ID="mychannelID" SESSION_ID="" HUGGINGFACE_TOKEN="myFaceToken" IMAGE_PROXY="image proxy url here" WS=true

TopherTimeMachine commented 9 months ago

Yes. Would be nice to automate getting the token. I was thinking might be able to make a chrome plugin that could grab it and send it to a endpoint?

@codsw I don't think you understand his question. He knows where to put the token. But when it expires it gives a error. So looking for a way to automate getting the token from a web browser.

NatalieM11 commented 4 months ago

try this fix. it's working for me - https://github.com/erictik/midjourney-api/pull/256/files