Do I need an API key?

Nov 4, 2009 at 8:15 PM



This is really great and you've done a wonderful job!  :)  I do have one question, do I need to get an API key from Smugmug in order to create my own application, or can I just use what you have made available?




Nov 4, 2009 at 8:22 PM

Sorry ... I got click happy.  I did see an API Key in the CommunicationsHelper class but I assume that's yours, correct?

Nov 4, 2009 at 10:54 PM
Edited Nov 4, 2009 at 10:57 PM


I’m glad you find my app useful. Every developer building an app for SmugMug needs an API key which is unique to him/her. If you are using one of my apps or dlls , you don’t need an API key,. If you are building your own, you do need an API key for it.


Dec 14, 2009 at 9:42 AM
Edited Dec 14, 2009 at 9:42 AM



Thanks buddy! Its really helpful.




Munish Singla

Dec 14, 2009 at 11:40 AM

Hi Alex,

This code is working ok for creating new album & upload images in same. I am trying to upload images in existing album by below code. All albums are retreived but, it gave error in last that "invalid album id". Please help.

            List<Album> objalbum = objUser.GetAlbums(true);
            Album oblAlb = new Album();
   = objalbum[0].id;
            oblAlb.Key = objalbum[0].Key;
            var up = oblAlb.CreateUploader();
            up.UploadCompleted += new EventHandler<UploadEventArgs>(img_UploadCompleted);
            up.UploadProgress += new EventHandler<UploadEventArgs>(img_UploadProgress);
            String img1 = "C:\\launch.jpg";

Looking forward to your response.

Munish Singla

Dec 14, 2009 at 4:40 PM

Thanks, mariagh.  I finished the first version of my application using your SmugMug Model.  It saved me boat loads of time and I haven't had any problems ;).

Dec 14, 2009 at 7:26 PM
Edited Dec 14, 2009 at 7:28 PM

Hi Munish.

The problem is that you create a new album object.


You already have a list of albums that you get from the user.

List<Album> objalbum = user.GetAlbums();


If that list is not empty, it is enough to use any item from it as an upload album.

Album oblAlb = objalbum[i];


If the list is empty, you should create a new album. In order to do that, you don’t need a new Album object to send to SmugMug, just a title for the album, and the response that you receive is an object of type album. If you want to create the new album in a certain category, you have to specify that, otherwise, it will be in Other by default.

Album myAlbum = user.CreateAlbum("AlbumTitle"); -> category is Other

 var myAlbum = myCategory.CreateAlbum("AlbumTitle"); ->category is myCategory

 var myAlbum = mySubCategory.CreateAlbum("AlbumTitle");->subcategory is mySubcategory



Dec 14, 2009 at 7:31 PM

I'm glad it helps! That was the whole point :). Hope you found it easy to use, if you have any comments, suggestions, feel free to post them.




Dec 14, 2009 at 7:35 PM

Extremely easy to use.  I will post any suggestions to a new thread.

Dec 14, 2009 at 7:44 PM

Thank you,


Dec 15, 2009 at 3:54 AM

Hey Maria,

Thanks a lot. It really works!


Munish Singla

Dec 15, 2009 at 9:48 PM

Glad to help!