• If you need help or want to discuss things, you now can also join us on our Discord Server!
  • A first preview of the unlimited version of SinusBot can be found in the Upcoming Changes thread. A version for Windows will follow, but we don't have a release date, yet.

Sinusbot API doesn't login

Status
Not open for further replies.
every time I try to log in with my Sinusbot with the API but it doesn't work

If you are not German you can ignore this:
Immer wenn ich versuche mich mit der Sinusbot API in den Bot einzuloggen kommt ein Error
 
Schicke uns bitte deinen Versuch dich bei API vom Bot einzuloggen. Also den Codeausschnitt ;)
 
Schicke uns bitte deinen Versuch dich bei API vom Bot einzuloggen. Also den Codeausschnitt ;)
Hallo
ich versuche so mit java und der gson API von google mich einzuloggen:
Code:
        String url = "http://" + host + ":" + port + "/api/v1/bot/login";
       
        LoginData d = new LoginData();
        d.username = username;
        d.password = password;
        d.botId = defaultID;

        String res = sendPostRequest(url, new Gson().toJson(d, LoginData.class));
       
        LoginResult lres = new Gson().fromJson(res, LoginResult.class);
        this.token = lres.token;

Danke für deine Hilfe und viel Glück ;)
 
Status
Not open for further replies.
Back
Top Bottom