smugmug.login.withHash Error 1

mediageekmediageek Registered Users Posts: 4 Beginner grinner
I am getting an invalid login error when trying to run a unit test to validate my call to smugmug.login.withHash. I use smugmug.login.withPassword inside the unit test first. This give my back my login object containing the UserId and the PasswordHash. I use the data to populate the withHash request.

Method = smugmug.login.withHash
UserId = <my user id retieved from login.withPassword>
PasswordHash - <PasswordHash retieved from login.withPassword>

I then get an invalid login error 1. How should I actually be unit testing this?

Thanks
-Ken

Comments

  • mediageekmediageek Registered Users Posts: 4 Beginner grinner
    edited April 4, 2009
    Does anyone have an opinion about my problem?

    The only way to get the PasswordHash is to call login.withPassword sometime at the beginning of application init, right? or can I get the PasswordHash and UserId some other way?

    How are other developers using smugmug.login.withHash ?
  • mhilbushmhilbush Registered Users Posts: 70 Big grins
    edited April 5, 2009
    mediageek wrote:
    Does anyone have an opinion about my problem?

    The only way to get the PasswordHash is to call login.withPassword sometime at the beginning of application init, right? or can I get the PasswordHash and UserId some other way?

    How are other developers using smugmug.login.withHash ?
    Are you passing the API key?
    Mark
    Mark
  • devbobodevbobo Registered Users, Retired Mod Posts: 4,339 SmugMug Employee
    edited April 5, 2009
    Ken,

    Please also be careful with case of the parameters since they are case sensitive.

    You listed UserId, it should be UserID.

    Hope this helps.

    David
    David Parry
    SmugMug API Developer
    My Photos
  • mediageekmediageek Registered Users Posts: 4 Beginner grinner
    edited April 6, 2009
    mhilbush wrote:
    Are you passing the API key?
    Mark

    Hi Mark,
    Thanks for the response. I am passing the API key from a base class.

    -Ken
  • mediageekmediageek Registered Users Posts: 4 Beginner grinner
    edited April 6, 2009
    devbobo wrote:
    Ken,

    Please also be careful with case of the parameters since they are case sensitive.

    You listed UserId, it should be UserID.

    Hope this helps.

    David

    Hi David,
    That was the exact problem....thx!!

    BTW: Is there an existing XML Rest schema like a wsdl that contains all the methods and objects for the SmugMug API?

    thanks
    -Ken
  • devbobodevbobo Registered Users, Retired Mod Posts: 4,339 SmugMug Employee
    edited April 6, 2009
    mediageek wrote:
    BTW: Is there an existing XML Rest schema like a wsdl that contains all the methods and objects for the SmugMug API?

    Not a XML rest schema, but I have been developing a "reflection" type interface, which I am using to automatically generate the API documentation here. It's not live yet, it's deployment has been delayed due to some other projects.

    Cheers,

    David
    David Parry
    SmugMug API Developer
    My Photos
Sign In or Register to comment.