• 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.

Solved API issues

Status
Not open for further replies.

Pantoflarz

Active 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
 

Tuetchen

Diesmon Dominator
is awesome!
Contributor
Insider
According to my current knowledge there were no changes in the web API of the bot since ages
 

flyth

is reticulating splines
Staff member
Developer
Contributor
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) :)
 

Pantoflarz

Active Member
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) :)

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
 
Status
Not open for further replies.
Top