1. The bot currently doesn't work with version 3.1 of the TS client. Please downgrade to an older version. Read this for more information on how to downgrade.

Solved API issues

Discussion in 'Installation' started by Pantoflarz, Oct 10, 2017.

  1. Pantoflarz

    Pantoflarz Member

    There is one thing I don't fully seem to understand. A new sinusbot version is made - no information anywhere. At least before, there was this page https://forum.sinusbot.com/resources/sinusbot-beta.3/ which hasn't been updated for a very long time.

    Second of all, there seem to have been some undocumented changes to the way the API operates on the newest version of Sinusbot as all my scirpts suddenly stopped working.

    I am using the php class available here:
    https://github.com/marburger93/SinusBot-API-PHP-Class/blob/master/sinusbot.class.php

    Before the update, my script worked fine, now I am unable to even login, despite all credentials staying the same.

    Code:
    $sinusbot = new SinusBot($port['address']);
    $sinusbot->login($port['username'], $port['password']);
    $instances = $sinusbot->getInstances();
               
    print_r($instances);
    
    from $instances I receive the following error:

    Code:
    Array
    (
        [success] =>
        [error] => Unauthorized
    )
    
    while if I print out $sinusbot I only receive the data below, so the authorisation token is missing. Yes, the password is correct, it works if I login manually via browser:

    Code:
    SinusBot Object
    (
        [wiURL] => http://xxx.xxx.xxx.xxx:8050
        [wiToken] =>
        [apiURL] => http://xxx.xxx.xxx.xxx:8050/api/v1
        [botUUID] => 1bfd818d-b2b7-4ac6-865b-cce79e16590d
        [instanceUUID] =>
    )
    

    Would be greatful for any help or anyone who could point me in the right direction :)

    Thanks guys
     
  2. Tuetchen

    Tuetchen Donor is awesome! Insider

    According to my current knowledge there were no changes in the web API of the bot since ages
     
  3. flyth

    flyth breaks stuff Staff Member Developer

    Actually, the new web backend is a little bit stricter and wants some Content-Type info before parsing the body. I already contacted ts3index to add that to their script and they should have already done so (just update that script from github) :)
     
    • Like Like x 1
  4. Pantoflarz

    Pantoflarz Member

    Thank you very much! It has indeed been updated and the new version works perfectly :)

    Another, more general topic, who can I contact in terms of licensing?

    Thanks
     

Share This Page