401 Unauthorized never clears

Forum rules
Get Help using the Schedules Direct service. NOTE: application issues are probably better resolved via the application's support methods. If you post here, at least include your application name!
Joann
Posts: 3
Joined: Sun Sep 09, 2007 6:41 pm

401 Unauthorized never clears

Post by Joann »

I understand that it's perfectly normal to get one 401 Unauthorized when grabbing channel data, but I never get beyond it. Here are the pertinent lines from my console log. I do have a subscribed lineup, and I've triple-checked the login data, even going so far as to change my SD password to something other than what I had on zap2it. I waited for today's other TMS troubles to show as cleared up in the forums, but it hasn't helped me any. Any suggestions would be welcome.

2007-09-09 18:04:49.644 Fetching lineups from Schedules Direct...
2007-09-09 18:04:49.726 Grabbing channel data
--18:04:49-- http://webservices.schedulesdirect.tmsd ... tvdService
=> `-'
Resolving webservices.schedulesdirect.tmsdatadirect.com... 206.18.98.175
Connecting to webservices.schedulesdirect.tmsdatadirect.com|206.18.98.175|:80... connected.
HTTP request sent, awaiting response... 401 Unauthorized
Reusing existing connection to webservices.schedulesdirect.tmsdatadirect.com:80.
HTTP request sent, awaiting response... 401 Unauthorized
Authorization failed.
2007-09-09 18:04:50.557 DataDirect: Deleting temporary files

rmeden
SD Board Member
Posts: 1579
Joined: Tue Aug 14, 2007 2:31 pm
Location: Cedar Hill, TX
Contact:

Re: 401 Unauthorized never clears

Post by rmeden »

Are you able to see your lineup when viewed on the SD site? That actually does a connection to Tribune, so if you see your lineups, it's working.

If you don't see your lineups, change your password (even to the same thing). That will resync them.

If you do see your lineups, make sure you specify your username (email) in all lower case.

Robert

Joann
Posts: 3
Joined: Sun Sep 09, 2007 6:41 pm

Re: 401 Unauthorized never clears

Post by Joann »

Yes, I can see my lineup (V4C2P8 antenna), even edit it and save the edits. My e-mail address/username is all lower case. I can actually login to the site (http://webservices.schedulesdirect.tmsd ... tvdService) through my browser, but get this error:

HTTP Status 405 - HTTP method GET is not supported by this URL

rmeden
SD Board Member
Posts: 1579
Joined: Tue Aug 14, 2007 2:31 pm
Location: Cedar Hill, TX
Contact:

Re: 401 Unauthorized never clears

Post by rmeden »

that's all normal. ( the SOAP servers uses POSTs, not GETs)

I would double/check the config in your application... that's where the problem lies, since everything else works (even the browser)

Robert

Joann
Posts: 3
Joined: Sun Sep 09, 2007 6:41 pm

Re: 401 Unauthorized never clears

Post by Joann »

I could never get myth to correctly use the SD grabber, so I installed xmltv and directed myth to use xmltv to access SD. Seems convoluted, but it works for me.

JoseRijo
Posts: 1
Joined: Fri Sep 14, 2007 8:14 am

Re: 401 Unauthorized never clears

Post by JoseRijo »

I had this same problem, but fixed it. I registered at schedulesdirect.org as 'JoseRijo', but it converted my name to all lowercase letters 'joserijo'. The webpage itself is case-insensitive, so I can log-on as 'JoseRijo'. But the actual service needs the username to be all lowercase.

Just make sure the username you use in mythtv is all lowercase.

GwinnChief
Posts: 3
Joined: Sat Sep 15, 2007 5:32 am

Re: 401 Unauthorized never clears

Post by GwinnChief »

This fixed my problem too. After changing my Schedule Direct login name to all lower case in mythtvsetup, problems solved. Thanks for the post. :D

dgc
Posts: 2
Joined: Tue Feb 19, 2008 3:45 pm

Re: 401 Unauthorized never clears

Post by dgc »

I'm having a similar problem logging in -- my login works for http://webservices.schedulesdirect.tmsd ... tvdService (it just gives me a GET not supported error, but at least it lets me log in), but I can't get it to work from a PHP database filling script. I'm subscribed to a lineup, and it shows up under My Account just fine.

The script is virtually unchanged from what I used to pull data from Zap2It. Here's some code, and the page it generates:

Code: Select all

$client = new SoapClient(
    'http://docs.tms.tribune.com/tech/tmsdatadirect/schedulesdirect/tvDataDelivery.wsdl',
        array(
        'trace' => 1,
        'exceptions' => 0,
        'authentication' => SOAP_AUTHENTICATION_DIGEST,
        'login' => $username,
        'password' => $password));
$start = substr(date("c", mktime(0,0,0,date("m"),date("d"),date("y"))), 0, 19). "Z"; // today
$end = substr(date("c", mktime(0,0,0,date("m"),date("d")+10,date("y"))), 0, 19)."Z"; // +10 days

echo "start is $start end is $end<br>";
$result = $client->download($start, $end);
echo '<pre>';
print_r($result);
echo '</pre>';
Output:

Code: Select all

start is 2008-02-19T00:00:00Z end is 2008-02-29T00:00:00Z

SoapFault Object
(
    [message:protected] => Unauthorized Request
    [string:private] => 
    [code:protected] => 0
    [file:protected] => /var/www/html/soap.php
    [line:protected] => 32
    [trace:private] => Array
        (
            [0] => Array
                (
                    [function] => __doRequest
                    [class] => SoapClient
                    [type] => ->
                    [args] => Array
                        (
                            [0] => 
2008-02-19T00:00:00Z2008-02-29T00:00:00Z

                            [1] => http://webservices.schedulesdirect.tmsdatadirect.com/schedulesdirect/tvlistings/xtvdService
                            [2] => urn:TMSWebServices:xtvdWebService#download
                            [3] => 1
                            [4] => 0
                        )

                )

            [1] => Array
                (
                    [function] => __call
                    [class] => SoapClient
                    [type] => ->
                    [args] => Array
                        (
                            [0] => download
                            [1] => Array
                                (
                                    [0] => 2008-02-19T00:00:00Z
                                    [1] => 2008-02-29T00:00:00Z
                                )

                        )

                )

            [2] => Array
                (
                    [file] => /var/www/html/soap.php
                    [line] => 32
                    [function] => download
                    [class] => SoapClient
                    [type] => ->
                    [args] => Array
                        (
                            [0] => 2008-02-19T00:00:00Z
                            [1] => 2008-02-29T00:00:00Z
                        )

                )

        )

    [faultstring] => Unauthorized Request
    [faultcode] => HTTP
)
It looks like an account problem -- I get the same response back if I put in the wrong password entirely -- but everything else about the account seems to work. I'm hoping to figure this out in the next 3 days, before the free trial runs out. I wish there were more developer info available for this service.

rmeden
SD Board Member
Posts: 1579
Joined: Tue Aug 14, 2007 2:31 pm
Location: Cedar Hill, TX
Contact:

Re: 401 Unauthorized never clears

Post by rmeden »

I tried your script and it worked fine.

Make sure you specify your username in lower case.

Log on to schedulesdirect.org and make sure you see a lineup. If you do, your Tribune account is set up properly... we use it to retrieve your lineup.

My bad on not having some TMS docs posted. I've received permission to do it, but am working on the best way to present it.

Robert

dgc
Posts: 2
Joined: Tue Feb 19, 2008 3:45 pm

Re: 401 Unauthorized never clears

Post by dgc »

Robert -- Thanks for checking it out. I'm not proud of this, but: I had two characters in the password switched. Thanks for confirming the script was okay; everything runs great. I'm sold.

Post Reply