• Gear
  • Shots
  • Photo Craft
  • Video
  • Wide Angle
  • Support
  • New Stuff
  • More
Support SmugMug APIs, Hacks & Tricks API Update - 18th November 2010

FAQtoid

Ever wanted to create an Avatar? Creating an Avatar!

Searching Dgrin with Google Searching with Google

Dgrin Challenges

Congratulations to the Winner of DSS #130 (Hot or Cold), Memol..

The next Dgrin Challenge DSS #131 (Music) is open for entries through June 24th, 2013 at 8:00pm PDT.

As always, we look forward to your participation but please do take a moment to read through the rules before posting your entry.

Past DSS Challenge Winners, DSS Challenge Rules, and other important DSS Challenge information is here.

Need some help with Accessories?

Tutorials

Ever find yourself wondering just how someone managed to create an image using different effects?

Here are three simple tutorials we hope will encourage you to try something new.

The Hot Seat

A lifelong interest in landscape photography has led Eyal Oren to make a study of his adopted hometown of Marblehead, MA. As you can see, his dedication is paying off!

Africa!

Dgrinners Harryb, Pathfinder, and others joined Andy Williams and Marc Muench on Safari in East Africa recently. Here are some awesome threads to check out!

 
Thread Tools Display Modes
Page 1  of  2
1 2
Old Nov-18-2010, 04:57 PM
#1
devbobo is offline devbobo OP
technicolored
devbobo's Avatar
API Update - 18th November 2010
G'day Guys,

Tonight we shipped some new functionality for api version 1.2.2...
http://wiki.smugmug.net/display/API/API+1.2.2

Coupons
- Added album restrictions support for coupons.
- smugmug.coupons.create and smugmug.coupons.modify now appect an AlbumIDs parameter...a comma separated string of AlbumIDs to restrict the coupon to.
- also added smugmug.coupons.restrictions.albums.add and smugmug.coupons.restrictions.albums.remove to modify restrictions on an individual basis
- smugmug.coupons.get and smugmug.coupons.getInfo now return a Restrictions element if any restrictions exist.

BoutiquePackaging
- Added boutique packaging support to all album methods.

FeaturedAlbums
- Added smugmug.featured.albums.get

Cheers,

David
__________________
David Parry
SmugMug API Developer
My Photos
Old Nov-18-2010, 08:38 PM
#2
Kevin L. Kitchens is offline Kevin L. Kitchens
Know me through my lens..
Kevin L. Kitchens's Avatar
Quote:
Originally Posted by devbobo View Post
G'day Guys,

Tonight we shipped some new functionality for api version 1.2.2...

Coupons
- Added album restrictions support for coupons.
- smugmug.coupons.create and smugmug.coupons.modify now appect an AlbumIDs parameter...a comma separated string of AlbumIDs to restrict the coupon to.
- also added smugmug.coupons.restrictions.albums.add and smugmug.coupons.restrictions.albums.remove to modify restrictions on an individual basis
- smugmug.coupons.get and smugmug.coupons.getInfo now return a Restrictions element if any restrictions exist.

BoutiquePackaging
- Added boutique packaging support to all album methods.

FeaturedAlbums
- Added smugmug.featured.albums.get

Cheers,

David
Any changes to just logging in? I cannot connect via API.

Getting a System.Xml.XmlException: Root element is missing on login.
__________________
Kevin L. Kitchens
"Know me through my lens."
My smugmug: http://peiklk.smugmug.com
My site: http://www.photographyvoice.com [POTD, Blog, News, & more!]
Old Nov-18-2010, 10:25 PM
#3
blackgold9 is offline blackgold9
Big grins
Well... my app is now reporting invalid api key... where it worked earlier. I'm not using oauth. That error actually failed my app in windows phone certification. Did anything change around keys?

Quote:
Originally Posted by devbobo View Post
G'day Guys,

Tonight we shipped some new functionality for api version 1.2.2...

Coupons
- Added album restrictions support for coupons.
- smugmug.coupons.create and smugmug.coupons.modify now appect an AlbumIDs parameter...a comma separated string of AlbumIDs to restrict the coupon to.
- also added smugmug.coupons.restrictions.albums.add and smugmug.coupons.restrictions.albums.remove to modify restrictions on an individual basis
- smugmug.coupons.get and smugmug.coupons.getInfo now return a Restrictions element if any restrictions exist.

BoutiquePackaging
- Added boutique packaging support to all album methods.

FeaturedAlbums
- Added smugmug.featured.albums.get

Cheers,

David
Old Nov-19-2010, 12:07 AM
#4
devbobo is offline devbobo OP
technicolored
devbobo's Avatar
Nothing changed from an API perspective with respect to logging in...but some work has been done on 'logging in' further down our stack. I've just double checked a few random apps that use basic auth...and they all seem to be working fine.

If your app is using an existing session, I suggest that you reset any SessionIDs or cookies that might be in use and obtain a new SessionID.

Cheers,

David
__________________
David Parry
SmugMug API Developer
My Photos
Old Nov-19-2010, 03:54 AM
#5
Kevin L. Kitchens is offline Kevin L. Kitchens
Know me through my lens..
Kevin L. Kitchens's Avatar
Quote:
Originally Posted by devbobo View Post
Nothing changed from an API perspective with respect to logging in...but some work has been done on 'logging in' further down our stack. I've just double checked a few random apps that use basic auth...and they all seem to be working fine.

If your app is using an existing session, I suggest that you reset any SessionIDs or cookies that might be in use and obtain a new SessionID.

Cheers,

David
Just tried again and getting "Root element is missing."

Code that's worked for many many months is now failing post-update.
__________________
Kevin L. Kitchens
"Know me through my lens."
My smugmug: http://peiklk.smugmug.com
My site: http://www.photographyvoice.com [POTD, Blog, News, & more!]
Old Nov-19-2010, 04:28 AM
#6
snapwood is offline snapwood
Big grins
Thie login is broken for many of my users including myself...

JSON: {
"message": "invalid user",
"method": "smugmug.albums.get",
"stat": "fail",
"code": 4
}

This is with accounts that were working before the API upgrade.

Can we get this fixed?

Thanks,

Brian
Old Nov-19-2010, 04:33 AM
#7
snapwood is offline snapwood
Big grins
Technically, the log in is returning OK. It is the the albums.get call that is not liking the resulting session id that is generated from the login. There is no caching of old sessions in my app.

Login returns:

JSON: {
"Login": {
"User": {
"URL": "http:\/\/photos.snapwoodstudios.com",
"DisplayName": "radian09",
"id": 111111,
"NickName": "radian09"
},
"AccountStatus": "Active",
"PasswordHash": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"SmugVault": false,
"Session": {
"id": "xxxxxxxxxxxxxxxxxxxxxxxxxxxx"
},
"FileSizeLimit": 25165824,
"AccountType": "Pro"
},
"method": "smugmug.login.withPassword",
"stat": "ok"
}

Get albums returns:

JSON: {
"message": "invalid user",
"method": "smugmug.albums.get",
"stat": "fail",
"code": 4
}

Last edited by snapwood; Nov-19-2010 at 04:58 AM.
Old Nov-19-2010, 05:25 AM
#8
blackgold9 is offline blackgold9
Big grins
Thats what im seeing to
Old Nov-19-2010, 05:32 AM
#9
devbobo is offline devbobo OP
technicolored
devbobo's Avatar
As stated earlier, changes were made to our 'login' functionality lower in our stack than the api.

Developers who are experiencing issues are most likely not calling login methods over https. I'm working on a new release that will throw the correct error message.

Cheers,

David
__________________
David Parry
SmugMug API Developer
My Photos
Old Nov-19-2010, 05:38 AM
#10
snapwood is offline snapwood
Big grins
That is a bad assumption. Here are my urls with the responses. I am using HTTPS:

https://api.smugmug.com/services/api...PIKey=myapikey
JSON: {
"Login": {
"User": {
"URL": "http:\/\/photos.snapwoodstudios.com",
"DisplayName": "radian09",
"id": 567279,
"NickName": "radian09"
},
"AccountStatus": "Active",
"PasswordHash": "xxxxxxxxxxxxxxxxxxxxxxxx",
"SmugVault": false,
"Session": {
"id": "xxxxxxxxxxxxxxx"
},
"FileSizeLimit": 25165824,
"AccountType": "Pro"
},
"method": "smugmug.login.withPassword",
"stat": "ok"
}

https://api.smugmug.com/services/api...xxxxxxxxxxxxxx
JSON: {
"message": "invalid user",
"method": "smugmug.albums.get",
"stat": "fail",
"code": 4
}
Old Nov-19-2010, 05:42 AM
#11
blackgold9 is offline blackgold9
Big grins
Same here. All my requests have the root url:[FONT=Consolas][FONT=Consolas][FONT=Consolas]
https://secure.smugmug.com/services/api/json/1.2.2/
[/FONT]
[/FONT]
[/FONT][FONT=Consolas][FONT=Consolas]
[/FONT]
[/FONT]
Old Nov-19-2010, 05:48 AM
#12
quiks is offline quiks
Big grins
quiks's Avatar
Quote:
Originally Posted by devbobo View Post
As stated earlier, changes were made to our 'login' functionality lower in our stack than the api.

Developers who are experiencing issues are most likely not calling login methods over https. I'm working on a new release that will throw the correct error message.

Cheers,

David
That's it, right there! I was using HTTP Login in my iPhone app.... My iPhone app is now broken. I need to update to HTTPS and re-submit it.... it's gonna take a week until it's on the App Store again...
Is that by any chance possible to keep the HTTP login method enabled for another week or so, so that developers have time to re-submit their app to Apple ? Would be amazing!

Thanks,
Greg.
Old Nov-19-2010, 05:51 AM
#13
devbobo is offline devbobo OP
technicolored
devbobo's Avatar
Quote:
Originally Posted by snapwood View Post
That is a bad assumption. Here are my urls with the responses. I am using HTTPS
it might not be the cause of your issue, but I can guarantee that numerous apps are currently failing for that reason.

I'm currently investigating your problem, I need to reproduce internally before I can work out what is going on.
__________________
David Parry
SmugMug API Developer
My Photos
Old Nov-19-2010, 05:53 AM
#14
snapwood is offline snapwood
Big grins
Thank you! This is the second time in less than a month that 'changes' have broken mine (and other) apps. I would be happy to test these changes before rollout if there was a method. I'd be happy to submit tests (or point you to how to run our apps) if that would help. Basically I'll do anything to avoid breakages like this...

Thanks,

Brian
Old Nov-19-2010, 05:53 AM
#15
devbobo is offline devbobo OP
technicolored
devbobo's Avatar
Quote:
Originally Posted by quiks View Post
That's it, right there! I was using HTTP Login in my iPhone app.... My iPhone app is now broken. I need to update to HTTPS and re-submit it.... it's gonna take a week until it's on the App Store again...
Is that by any chance possible to keep the HTTP login method enabled for another week or so, so that developers have time to re-submit their app to Apple ? Would be amazing!

Thanks,
Greg.
Hey Greg,

I'd love to help out...but the recent changes were in relation to side jacking exploits. And I think I'd have a tough time getting the changes rolled back.

Sorry,

David
__________________
David Parry
SmugMug API Developer
My Photos
Old Nov-19-2010, 06:19 AM
#16
blackgold9 is offline blackgold9
Big grins
Thanks for being on it david.
I'm curious, what IS a side jacking exploit?
Old Nov-19-2010, 06:29 AM
#17
devbobo is offline devbobo OP
technicolored
devbobo's Avatar
Quote:
Originally Posted by blackgold9 View Post
Thanks for being on it david.
I'm curious, what IS a side jacking exploit?
just google side jacking or firesheep.
__________________
David Parry
SmugMug API Developer
My Photos
Old Nov-19-2010, 06:52 AM
#18
devbobo is offline devbobo OP
technicolored
devbobo's Avatar
Brian/Stephen,

I've reproduced the issue internally and have tracked down where the problem is...but I need to get more info on the recent underlying changes and that person is currently asleep.

One workaround is to only request login methods over https, and make all other calls over http.

Hope this helps a little bit.

Cheers,

David
__________________
David Parry
SmugMug API Developer
My Photos
Old Nov-19-2010, 07:15 AM
#19
devbobo is offline devbobo OP
technicolored
devbobo's Avatar
Heading to bed, just a recap for everyone...

- calls to smugmug.login.* need to be done over https
- all other calls should be done over http (temporary workaround)

Cheers,

David
__________________
David Parry
SmugMug API Developer
My Photos
Old Nov-19-2010, 09:39 AM
#20
Kevin L. Kitchens is offline Kevin L. Kitchens
Know me through my lens..
Kevin L. Kitchens's Avatar
Quote:
Originally Posted by devbobo View Post
Heading to bed, just a recap for everyone...

- calls to smugmug.login.* need to be done over https
- all other calls should be done over http (temporary workaround)

Cheers,

David
Just tried it again and it worked... Still using http
__________________
Kevin L. Kitchens
"Know me through my lens."
My smugmug: http://peiklk.smugmug.com
My site: http://www.photographyvoice.com [POTD, Blog, News, & more!]
Page 1  of  2
1 2
Tell The World!  
Similar Threads Thread Starter Forum Replies Last Post
API Update - Printmarks (27th August 2010) devbobo SmugMug APIs, Hacks & Tricks 4 Aug-29-2010 04:23 PM
API Update - 18th March 2010 devbobo SmugMug APIs, Hacks & Tricks 0 Mar-19-2010 12:55 AM
API Update - 6th March 2010 devbobo SmugMug APIs, Hacks & Tricks 3 Mar-18-2010 03:01 PM
Delayed effect of create and update functions in the API flyingdutchie SmugMug APIs, Hacks & Tricks 8 Dec-11-2007 10:37 AM
API Update Archive devbobo SmugMug APIs, Hacks & Tricks 0 Oct-09-2007 04:16 PM


Thread Tools
Display Modes

Posting Rules  
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump