Hi!
I'm actually storing token and userId to disk to prevent requesting login again between restarts of my app.
While initializing the ThreadsAPI object, giving those to it without username and password will throw Error: Username or password not set when calling `publish() (and maybe on other methods, not tried yet).
However, I've quickly browsed the code of the publish() method and it seems that it doesn't require neither username nor the password as soon as token and userId are available.
As a current workaround I'm instanciating ThreadsAPI with dummy username and password:
new ThreadsAPI({ username: " ", password: " ", token: token, userID: userId });
Hi! I'm actually storing
token
anduserId
to disk to prevent requesting login again between restarts of my app.While initializing the
ThreadsAPI
object, giving those to it withoutusername
andpassword
will throwError: Username or password not set
when calling `publish() (and maybe on other methods, not tried yet).However, I've quickly browsed the code of the
publish()
method and it seems that it doesn't require neitherusername
nor thepassword
as soon astoken
anduserId
are available.As a current workaround I'm instanciating
ThreadsAPI
with dummyusername
andpassword
:new ThreadsAPI({ username: " ", password: " ", token: token, userID: userId });