Options

Login.withPassword failure with 1.2.0

Kevin L. KitchensKevin L. Kitchens Registered Users Posts: 149 Major grins
No problems before with 1.1.1... now the login.withPassword is failing. I see I no longer pass the version #, but the order is also new. I put APIKey first and I keep getting an error message.

Any ideas?
I'm getting a faultcode 18, invalid API Key
Kevin L. Kitchens
"Know me through my lens."
My smugmug: http://peiklk.smugmug.com
My site: http://www.photographyvoice.com [POTD, Blog, News, & more!]

Comments

  • Options
    devbobodevbobo Registered Users, Retired Mod Posts: 4,339 SmugMug Employee
    edited February 11, 2008
    No problems before with 1.1.1... now the login.withPassword is failing. I see I no longer pass the version #, but the order is also new. I put APIKey first and I keep getting an error message.

    Any ideas?
    I'm getting a faultcode 18, invalid API Key

    Kevin,

    What are you using to generate you xml-rpc requests ?

    Cheers,

    David
    David Parry
    SmugMug API Developer
    My Photos
  • Options
    Kevin L. KitchensKevin L. Kitchens Registered Users Posts: 149 Major grins
    edited February 11, 2008
    devbobo wrote:
    Kevin,

    What are you using to generate you xml-rpc requests ?

    Cheers,

    David

    SmugMugAPI by CookComputing.
    [XmlRpcUrl("http://api.smugmug.com/hack/xmlrpc/1.2.0/")]
    public interface ISmugMug
    {
        [XmlRpcMethod("smugmug.login.withPassword")]
        Credentials LoginWithPassword(string APIKey, string emailAddress, string password);
    
    ...
    

    This is my modified version from the original, where I altered the order of the parameters, though I thinking that really doesn't matter.
    Kevin L. Kitchens
    "Know me through my lens."
    My smugmug: http://peiklk.smugmug.com
    My site: http://www.photographyvoice.com [POTD, Blog, News, & more!]
  • Options
    devbobodevbobo Registered Users, Retired Mod Posts: 4,339 SmugMug Employee
    edited February 11, 2008
    Kevin,

    Can you please read this thread. I have checked the code and it seems that it's still expecting Version as a parameter, if you send non-named parameters.

    I am going to fix that in the code while trying to make it backwards compatible, howver the method mentioned in that thread will be a much better way to proceed.

    Cheers,

    David
    David Parry
    SmugMug API Developer
    My Photos
  • Options
    Kevin L. KitchensKevin L. Kitchens Registered Users Posts: 149 Major grins
    edited February 11, 2008
    devbobo wrote:
    Kevin,

    Can you please read this thread. I have checked the code and it seems that it's still expecting Version as a parameter, if you send non-named parameters.

    I am going to fix that in the code while trying to make it backwards compatible, howver the method mentioned in that thread will be a much better way to proceed.

    Cheers,

    David

    Now I put the params back in the old order with version, I modified to struct to the 1.2.0 return response and I'm getting an error about the struct not conforming to the return item or something.

    public struct Credentials
    {
    	public CredSession Session;
    	public CredUser User;
    	public string PasswordHash;
    	public string AccountType;
    	public int FileSizeLimit;
    
    	// suppress compiler warnings
    	private Credentials(string sSessionID, int iUserID, string sPasswordHash)
    	{
    		this.Session.ID = sSessionID;
    		this.User.ID = iUserID;
    		this.User.DisplayName = "";
    		this.User.NickName = "";
    		this.PasswordHash = sPasswordHash;
    		this.FileSizeLimit = 1000000;
    		this.AccountType = "";
    	}
    
    	public struct CredSession
    	{
    		public string ID;
    	}
    
    	public struct CredUser
    	{
    		public int ID;
    		public string NickName;
    		public string DisplayName;
    	}
    }
    
    Kevin L. Kitchens
    "Know me through my lens."
    My smugmug: http://peiklk.smugmug.com
    My site: http://www.photographyvoice.com [POTD, Blog, News, & more!]
  • Options
    devbobodevbobo Registered Users, Retired Mod Posts: 4,339 SmugMug Employee
    edited February 11, 2008
    Can you please suppy the raw request and the response.

    Thanks,

    David
    David Parry
    SmugMug API Developer
    My Photos
  • Options
    Kevin L. KitchensKevin L. Kitchens Registered Users Posts: 149 Major grins
    edited February 11, 2008
    devbobo wrote:
    Can you please suppy the raw request and the response.

    Thanks,

    David

    Sadly no - or I could figure it out. :)

    I'm still using the login.withPassword method as my site has been down now for 4 days because of the smugmug change. I need to get back up ASAP.

    The response is a Login struct and I've made my struct conform to the one found here: http://wiki.smugmug.com/display/SmugMug/smugmug.login.withPassword+1.2.0 and it's still a no go!!!
    Kevin L. Kitchens
    "Know me through my lens."
    My smugmug: http://peiklk.smugmug.com
    My site: http://www.photographyvoice.com [POTD, Blog, News, & more!]
  • Options
    Kevin L. KitchensKevin L. Kitchens Registered Users Posts: 149 Major grins
    edited February 11, 2008
    Update... I was able to get past the login method... I looked more closely at the response sample item and discovered the order of the response was different than the Wiki listed.

    Also, the case of the members mattered as I had ID instead of id.

    Now, I'm back to the GetEXIF issue. It expects imageID and imageKey. What if I'm getting image info for an old upload that did not use the imageKey? What do I use for imageKey? I tried NULL and I tried "".
    Kevin L. Kitchens
    "Know me through my lens."
    My smugmug: http://peiklk.smugmug.com
    My site: http://www.photographyvoice.com [POTD, Blog, News, & more!]
  • Options
    Kevin L. KitchensKevin L. Kitchens Registered Users Posts: 149 Major grins
    edited February 11, 2008
    Update...

    The getEXIF now works as I set the id in the struct to optional. The reason id was not coming back at all was because the imageKey was incorrect.
    Kevin L. Kitchens
    "Know me through my lens."
    My smugmug: http://peiklk.smugmug.com
    My site: http://www.photographyvoice.com [POTD, Blog, News, & more!]
Sign In or Register to comment.