Tell me more ×
SmugMug Stack Exchange is a question and answer site for SmugMug developers and end users. It's 100% free, no registration required.

I am using Python and oauth to access the Smugmug API 1.3.0. I've managed to retrieve a list of albums, and a list of images within the album, and details of each image including its URL.

What I don't understand is why smugmug needs a "Key" parameter to e.g. smugmug.images.get or smugmug.images.getInfo. My request already comes with an oauth token, which authenticates and authorizes me. Why not just ask for the image Id and leave it at that? I notice that smugmug.images.delete and smugmug.images.rotate don't require a key.

More broadly, what are the properties of the Id and Key? Can I assume that they will remain unchanged, as long as the image remains unchanged (i.e. not cropped etc.)? What if I rename the image?

share|improve this question

1 Answer

up vote 3 down vote accepted

Every image has an ID and a key. ID's are somewhat predictable and numeric only (monotomically increasing as more images are uploaded). Keys are pretty random (alpha and numeric). You generally need both ID and key to access an image. A long time ago, there were only IDs, but Smugmug added keys in response to some security/privacy issues to keep people from being able to easily find other people's non-public images by guessing IDs.

Once an image is uploaded, it's ID and key never change, even if the image is changed (cropped or otherwise edited).

I don't know why some operations require the image key and some do not.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.