smugmug.images.getInfo, smugmug.images.getURLs and Smart Galleries

N1080iN1080i Registered Users Posts: 3 Beginner grinner
Here's the scenario, I have a gallery, let's call it "mixed gallery", with images uploaded to it as well as images that pulled into it via smart gallery rules. Some of these pictures that are pulled to the gallery via the smart gallery rule come from galleries that are passworded (i.e. user need a password to enter the gallery). From the web if a user goes into mixed gallery (which by the way is NOT passworded) the user see all the images even ones that are pulled in from passworded galleries via the smart gallery rule.

With all that said here is my question. Using that APIs i call smugmug.images.get and it returns IDs and Keys for all the images in the gallery (including images pulled in via the smart gallery rule). If I call either smugmug.images.getURLs or smugmug.images.getInfo passing the SessionID, ImageID and ImageKey I get a response saying that the password is invalid for the images that come from passworded galleries.

I sort of understand why, but I don't expect this since from the web the user can access the images without having a password as long as they are accessing it via the mixed gallery. Do I need to do something different when I make the call to smugmug.images.getURLs or smugmug.images.getInfo like pass an additional parameter (obviously not the password parameter)?

How do I get this to work?

Comments

  • N1080iN1080i Registered Users Posts: 3 Beginner grinner
    edited February 4, 2011
    any ideas anyone??
  • N1080iN1080i Registered Users Posts: 3 Beginner grinner
    edited February 4, 2011
    A bit more information on the request and response

    Here is my HTTP request
    "http://api.smugmug.com/services/api/rest/1.2.2?method=smugmug.images.getInfo&SessionID=VALIDSESSIONIDREMOVED&ImageID=892421071&ImageKey=bUJBJ&APIKey=VALIDAPIKEYREMOVED"

    And here is my response
    <?xml version="1.0" encoding="utf-8"?>
    smugmug.images.getInfo

    If i throw request that in a browser i get the exact same error. Now, if I add the password parameter retry it I get the response I expect. It appears as though I have to supply the password in order to get this to work.

    If anyone needs additional information just let me know.
  • devbobodevbobo Registered Users, Retired Mod Posts: 4,339 SmugMug Employee
    edited February 9, 2011
    Using the Extras parameter, you should be able to return any image parameters that you require within the smugmug.images.get call...without having to call smugmug.images.getInfo or smugmug.images.getURLs.

    eg. &Extras=Caption,LargeURL.

    Hope this helps,

    David
    David Parry
    SmugMug API Developer
    My Photos
  • Marc RochkindMarc Rochkind Registered Users Posts: 21 Big grins
    edited February 24, 2011
    I am also seeing a problem with a non-passworded smart gallery that includes a passworded gallery, but my symptoms are different from the OP's. I get URLs for the images when I access the smart gallery, but those URLs do not work. Not in my app, and not when pasted into a browser. (The browser just shows a blank window.) No error message at all, which means that I can't show a reasonable error message to the user.

    How can I detect this problem via the API?
Sign In or Register to comment.