Using curl to download the urls from smugmug.images.getURLs

guidoguido Registered Users Posts: 1 Beginner grinner
I've been playing around with the SmugMug API today (which BTW is awesome, thank you so much) and I can't seem to figure out how to actually download an image. I'm getting lists of albums and lists of images fine, but there doesn't seem to be an API to download the actual image. Seems like that shouldn't be a problem, I have the url from smugmug.images.getURLs but the gallery I'm trying to download from is locked-down so plain-ol-curl isn't going to do the job. I imagine that there's some sort of header or cookie that I can set to let the service know that I've been authenticated and authorized, I tried setting the X-Smug-SessionID header like from some examples of uploading but it's not doing the job.

For example:

curl -H "X-Smug-SessionID: blahblahblah" "http://foo.smugmug.com/photos/blahblahblah-O.jpg" -o foo.jpg

So, how do I download an image from a locked-down gallery from the command line?

I imagine that the answer is probably super simple and I'm just being an idiot. Sorry for the stupid question.

Comments

  • devbobodevbobo Registered Users, Retired Mod Posts: 4,339 SmugMug Employee
    edited April 12, 2009
    Sending the cookie SMSESS with the value of the SessionID should work fine.

    Cheers,

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