Closed qeinz closed 6 months ago
Hi @qeinz!
The only way I managed to reproduce an invalid parameter size (ID 1541)
error with the "queryloginadd" command was when the loginName
argument was null, an empty string, or a string of length greater than 20. It does not appear that this size constraint is documented anywhere in the TS3 documentation...
Could you please check whether your UID
string fits within these constraints? Considering that you appear to be generating your query login name, I could well imagine its size being longer than 20 characters 😄
thx, its now working, the problem was indeed the length of the login_name, i've tried to fit the UID into the loginName. Now i used this to get it working:
public static void createChatAppContactQueryLogin(String seckey) {
try {
final String UID = Utils.getUIDFromSeckey(seckey);
final String login_name = UID.substring(0, 19);
final int DBID = Main.api.getDatabaseClientByUId(UID).getDatabaseId();
final String login_password =
Main.api.addServerQueryLogin(login_name, DBID).getQueryClientLoginPassword();
System.out.println("logind login_password " + login_password);
System.out.println("logind dbid " + DBID);
System.out.println("logind uid " + UID);
update("INSERT INTO app_queryaccounts (seckey, login_name, password) VALUES " +
"('" + seckey + "', '" + login_name + "', '" + login_password + "');");
} catch (Exception exception) {
System.out.println("ERROR " + exception);
}
}
Awesome, great to hear that! 🥳 🎉
hello, how can i add a querylogin and get the login credentials afterwards?
this is my current setup, but im only facing some spicy errors