Jump to content

ATTENTION WEBUI DEVELOPERS: Support token authentication


Ultima

Recommended Posts

I have read through this, it is apparently in PHP and I am not familiar enough with it to translate to VB. Since my 2.21 has been working for a year and the change to 3.12 broke things, should I assume it is the fact that I am not implementing Cookies? When I call the token.html it only returns the token, not the other information in my VB and I don't see a similar method to perform the GET and obtain the Cookie.

Link to comment
Share on other sites

  • 10 months later...

I'm having some trouble with the API using PHP. My code:

$auth = compact('user', 'pass');
// here the response is correct$tokenHtml = http::get('http://localhost:8080/gui/token.html', array(), $auth);  
$doc = new \DomDocument();$doc->loadHTML($tokenHtml->body());$xpath = new \DOMXPath($doc);$token = $xpath->evaluate('string(//div[@id=token]/text()[1])');
$params = compact('token') + array('list' => 1);
// here i get "invalid request" $response = http::get('http://localhost:8080/gui/', $params, $auth);

The 2nd GET request URL looks like:

http://localhost:8080/gui/?token=0PS859GrwTDWmTONlkIx82-O1kRGHS3lLPCyB3tvGdnn9vwPHi4oxxEZ01AAAAAA&list=1

Is there any way I can find out the reason why this is an invalid request?

Link to comment
Share on other sites

  • 2 months later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...