midjourney-api icon indicating copy to clipboard operation
midjourney-api copied to clipboard

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

Open SaschaHeyer opened this issue 2 years ago • 3 comments

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

/

SaschaHeyer avatar Sep 01 '23 05:09 SaschaHeyer

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

codsw avatar Sep 06 '23 22:09 codsw

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.

TopherTimeMachine avatar Oct 11 '23 01:10 TopherTimeMachine

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

NatalieM11 avatar Feb 23 '24 14:02 NatalieM11