Ultima Posted February 11, 2012 Author Report Share Posted February 11, 2012 In the first post:Lord Alderaan has graciously posted his recommendations for using token authentication. Link to comment Share on other sites More sharing options...
freelunch Posted February 12, 2012 Report Share Posted February 12, 2012 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 More sharing options...
freelunch Posted February 13, 2012 Report Share Posted February 13, 2012 Never mind, I figured it out. Apparently in VB the calls are different to 2.x and 3.x. Once I resolved the json calls and added/omitted the cookie my program now works in both. Link to comment Share on other sites More sharing options...
onetrickpony Posted December 20, 2012 Report Share Posted December 20, 2012 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=1Is there any way I can find out the reason why this is an invalid request? Link to comment Share on other sites More sharing options...
onetrickpony Posted December 21, 2012 Report Share Posted December 21, 2012 ok nvm. apparently you need to send the "GUID" cookie as well...(this should be noted in the docs) Link to comment Share on other sites More sharing options...
Jothay Posted March 3, 2013 Report Share Posted March 3, 2013 Sorry, the page said this post didn't go through and I made a new thread Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.