smugmug.login.withHash Error 1
mediageek
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
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
0
Comments
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 ?
Mark
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
SmugMug API Developer
My Photos
Hi Mark,
Thanks for the response. I am passing the API key from a base class.
-Ken
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
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
SmugMug API Developer
My Photos