APIKey question

jfriendjfriend Registered Users Posts: 8,097 Major grins
If I wanted to make a Smugmug javascript site customization public (so others can use it) and that customization needs to use an APIKey in order to query the Smugmug api, what is the recommended option:
  1. Don't release my own APIKey. Make anyone who wants to use the customization on their site get their own APIKey and edit it into the script - this would be a big obstacle to copy/paste customizers (e.g. non-programmers) being able to use the customization.
  2. Release my own APIKey with the script.
  3. Ask Smugmug for a new APIKey that could be released just for the purposes of this script and is different than the one that is associated with my Smugmug account.
  4. Use the undocumented /rpc/gallery.mg apis that don't require an APIKey to get the info I need.
  5. Some other option I haven't thought of.
--John
HomepagePopular
JFriend's javascript customizationsSecrets for getting fast answers on Dgrin
Always include a link to your site when posting a question

Comments

  • devbobodevbobo Registered Users, Retired Mod Posts: 4,339 SmugMug Employee
    edited November 30, 2010
    jfriend wrote: »
    Don't release my own APIKey. Make anyone who wants to use the customization on their site get their own APIKey and edit it into the script - this would be a big obstacle to copy/paste customizers (e.g. non-programmers) being able to use the customization.
    This would be what I typically recommend, but given that it's targetted at non coders. Releasing it with an API Key might be the best option.
    jfriend wrote: »
    Release my own APIKey with the script.
    As above.
    jfriend wrote: »
    Ask Smugmug for a new APIKey that could be released just for the purposes of this script and is different than the one that is associated with my Smugmug account.
    You can request additional APIKeys associated with your account using the normal API Key request form, but we have no way to issue API keys that aren't associated with an account.
    jfriend wrote: »
    Use the undocumented /rpc/gallery.mg apis that don't require an APIKey to get the info I need.
    From experience this method is a nightmare, are rpc calls are subject to change without notice.

    John, any chance you could email me the code to take a look at ?

    Thanks,

    David
    David Parry
    SmugMug API Developer
    My Photos
  • jfriendjfriend Registered Users Posts: 8,097 Major grins
    edited November 30, 2010
    devbobo wrote: »
    From experience this method is a nightmare, are rpc calls are subject to change without notice.

    John, any chance you could email me the code to take a look at ?
    Code is still in progress. I'm just trying to get a list of the images in a given gallery (just need id, key, height, width, max size available for each image). I'm only using smugmug.login.anonymously and smugmug.images.get and smugmug.logout. I wish there was a way to get the list of public images without first establishing a session. Speed is important here and the extra serialized roundtrip is a bummer (issue login, wait for answer to get session, issue images.get, wait for response). The one advantage of using /rpc/gallery.mg to do this is that it only takes one roundtrip so it gets the answer faster. I agree on the perils of using undocumented calls that might change.

    Sounds like I should request a second APIKey that is devoted just to publicly released customizations. I didn't know I could do that. Thanks for the info.
    --John
    HomepagePopular
    JFriend's javascript customizationsSecrets for getting fast answers on Dgrin
    Always include a link to your site when posting a question
Sign In or Register to comment.