Options

Invalid user???

TazzyTazzyTazzyTazzy Registered Users Posts: 32 Big grins
This was working fine last night. Now, all of a sudden, it's dead? I checked my API key, it's still working.

I can get a new sessionID after login, but I can't get a list of albums? Also, for some reason, I can get imageURLs without a session ID. I can log in fine through the login function. I get a new sessionID everytime i login. Just for kicks, i tried loggin in with bogus username/password, and I don't get a sessionID, so my login function works. Here's some output:

My request: = smugmug.albums.get

Structure of array that gets sent to smugmug through a PHP XML parser. You can see I'm sending my session id, and it's result:

Array ( [0] => xmlrpcval Object ( [me] => Array ( [string] => 8888SESSIONID_REMOVED_FOR_POST888 ) [mytype] => 1 [_php_class] => ) ) XML-RPC Fault #4: invalid user


Now, get this, i can get imageURLS just find without sessionID being sent to smugmug:

request = smugmug.images.getURLs
Array ( [0] => xmlrpcval Object ( [me] => Array ( [string] => ) [mytype] => 1 [_php_class] => ) [1] => xmlrpcval Object ( [me] => Array ( [int] => 72911763 ) [mytype] => 1 [_php_class] => ) [2] => xmlrpcval Object ( [me] => Array ( [int] => 9 ) [mytype] => 1 [_php_class] => ) )


Here's a request with the session ID int he request for reference:

Array ( [0] => xmlrpcval Object ( [me] => Array ( [string] => 8888SESSIONID_REMOVED_FOR_POST888 ) [mytype] => 1 [_php_class] => ) [1] => xmlrpcval Object ( [me] => Array ( [int] => 72911763 ) [mytype] => 1 [_php_class] => ) [2] => xmlrpcval Object ( [me] => Array ( [int] => 9 ) [mytype] => 1 [_php_class] => ) )

I know this is a bit hard to read, sorry. But, if you break each one down, it's a multi-dimensional array, each array containing a single argument. The PHP XML-RPC module converts this mess to XML request to smugmug.

ANyways, any ideas why i can't get album information? Although, I can get imageURLs without SessionID's?

-Mitch

Comments

  • Options
    devbobodevbobo Registered Users, Retired Mod Posts: 4,339 SmugMug Employee
    edited June 22, 2006
    Mitch,

    Check that your sessionID hasn't expired, that is the error message you get when the sessionID has expired or is invalid. This would suggest why it worked last night and not now.

    Cheers,

    David
    David Parry
    SmugMug API Developer
    My Photos
  • Options
    TazzyTazzyTazzyTazzy Registered Users Posts: 32 Big grins
    edited June 22, 2006
    devbobo wrote:
    Check that your sessionID hasn't expired
    David,
    Thanks, but I already tried that. This module keeps track of when the sessionID was renewed - it renews itself if it's more then 5 hours old. Just for kicks, I set the timeout to be 30 seconds, and I see I'm getting different sessionID's every 30 seconds. So, my username/password has to be correct to get a new session ID doesn't it? Same with my API key - has to be valid to get sessionID (at least I'd hope the above is correct.

    I find the strange part in that the API doesn't require a sessionID when getting imageURLs - this could be a potential source of security against smugmug.

    I'm still playing around, i still can't figure out why it's not working. GGRRRR....

    -Mitch
  • Options
    devbobodevbobo Registered Users, Retired Mod Posts: 4,339 SmugMug Employee
    edited June 22, 2006
    TazzyTazzy wrote:
    So, my username/password has to be correct to get a new session ID doesn't it? Same with my API key - has to be valid to get sessionID (at least I'd hope the above is correct.
    That's seems correct to me, do other method calls work successfully once you have logged in ?
    TazzyTazzy wrote:
    I find the strange part in that the API doesn't require a sessionID when getting imageURLs - this could be a potential source of security against smugmug.

    Not really IMO, my guess is that if you didn't provide a sessionID and it return imageURLS. The URLs returned would be the same as if you have logged on anonymously.

    I undertstand your frustration, stick at it you'll work it out.

    David
    David Parry
    SmugMug API Developer
    My Photos
  • Options
    TazzyTazzyTazzyTazzy Registered Users Posts: 32 Big grins
    edited June 22, 2006
    It's working...
    Soo, i took an hour off from the computer. Cleaned house, did dishes, ironed some clothes..and, i pressed refresh on my browser, and it works!! Hrrrm... I think something must have been going on in the backend somewhere.

    However, while this all broken, it did give me a chance to put code in my module to trap for errors. Instead of some nasty looking text on my webpage, it simply says "Sorry, the local version of the gallery is offline, please see the copy at http://warmy.smugmug.com/" At there's some good from all this. :-)

    -Mitch
Sign In or Register to comment.