andrewshilliday
Jun-21-2010, 06:30 AM
As we develop applications using the SmugMug API, are we supposed to keep our requested API keys private (even from uses of our applications)?
To be a little more concrete: I'm developing a plug-in for a JavaScript image gallery viewer, so that the viewer is automatically populated with images from a SmugMug album (this is similar to something I did a while ago with a flash-based viewer -- search the forums for SmugMugViewer if you're interested). The plug-in itself does not require the API key; instead you pass an API key as an argument when you create the object in javascript. I was, however, planning to include with the source code a simple HTML example for how to include the viewer in a web page and link it to an SM album, and would need to hard code my API key into that HTML file in order for it to function.
So which is the correct answer: (a) I should avoid publicizing the API key; (b) I can hard code the API key, but ask users to proved their own when deploying the application on their website; or (c) I should provide the API key and ask that users use the SAME key when deploying it on their website.
Cheers
P.S. If anyone's interested, the image viewer I'm integrating with SmugMug is called Galleria (http://galleria.aino.se); I'll make a post in the near future when I release the code.
To be a little more concrete: I'm developing a plug-in for a JavaScript image gallery viewer, so that the viewer is automatically populated with images from a SmugMug album (this is similar to something I did a while ago with a flash-based viewer -- search the forums for SmugMugViewer if you're interested). The plug-in itself does not require the API key; instead you pass an API key as an argument when you create the object in javascript. I was, however, planning to include with the source code a simple HTML example for how to include the viewer in a web page and link it to an SM album, and would need to hard code my API key into that HTML file in order for it to function.
So which is the correct answer: (a) I should avoid publicizing the API key; (b) I can hard code the API key, but ask users to proved their own when deploying the application on their website; or (c) I should provide the API key and ask that users use the SAME key when deploying it on their website.
Cheers
P.S. If anyone's interested, the image viewer I'm integrating with SmugMug is called Galleria (http://galleria.aino.se); I'll make a post in the near future when I release the code.