More possible bugs with the PHP 1.2.2 endpoint (Not tested other endpoints)
Hmmm, may be missing something here, but the following methods don't seem to do anything or offer any response, even when using deliberately incorrect information:
albums.applyWatermark, albums.removeWatermark, images.applyWatermark, images.removeWatermark, images.rotate, images.zoomThumbnail and images.crop
More importantly, if you don't specify an AlbumID when changing the settings of an image using images.changeSettings, it gets assigned an AlbumID of 0 instead of keeping it's original AlbumID like it does with the other revisions of the PHP endpoint.
I kept a record of the ImageID and ImageKey for one of the images that "disappeared" and used images.getInfo to "find" it and this is what is returned:
propricing.getImage and propricing.getAlbum don't acknowledge new Strict=0 func
Hi there
Another inconsistency/bug:
It appears propricing.getImage and propricing.getAlbum don't acknowledge the new Strict=0 functionality. They always return an error response (old behaviour) even if Strict=0 is explicitly stated.
I am in process of integrating 1.2.2 API into our service. When the user hits the authorization URL, there is only one option "Access photos from your public galleries". But after authorization, if the user goes to the control panel, then he/she can select "Full Access".
So is there a way to give the option of access right at the authorization stage?
I am in process of integrating 1.2.2 API into our service. When the user hits the authorization URL, there is only one option "Access photos from your public galleries". But after authorization, if the user goes to the control panel, then he/she can select "Full Access".
So is there a way to give the option of access right at the authorization stage?
Thanks,
Rakesh
Hi Rakesh,
Yes, sorry I'm a bit lagged with the full documentation, when you call the authorize url, you can send the following parameters...
&Access=[Public or Full]
&Permissions=[Read, Add or Modify]'
Posted too quickly :P .. Had missed that I need to add both AlbumID and AlbumKey . Can you update the error code to reflect such cases ? ( Instead of "system error" )
Regression in watermarks.create()
Looks like we've got some sort of regression in watermarks.create(): it's continually returning error #16 - "invalid data (invalid Dissolve parameter)".
This occurs regardless of whether a dissolve param is supplied or not.
Is there a technical/formal documentation (like a WSDL or something) that would reflect the actual implementation in the system? Right now, there is quite a bit of try/error involved...
That's not actually correct, AlbumTemplateID and TemplateID are two seperate parameters.
AlbumTemplateID corresponds to an AlbumTemplate holding gallery/album options.
TemplateID corresponds to the style template used for view the gallery, eg Viewer Controlled, SmugMug, Journal, etc. The full list can be obtained by calling method smugmug.styles.getTemplates.
Is there a technical/formal documentation (like a WSDL or something) that would reflect the actual implementation in the system? Right now, there is quite a bit of try/error involved...
I'm in the process of implementing something like this for api 1.2.2, which will be used to autogenerate the api documentation. You can see a preview of it here.
oauth callback problem?
is this the right place to ask about oauth problems too? it seemed like 1.2.2 and oauth are linked, so here's my question:
i am able to get an oauth request token and i can authorize it as well. however in my authorize url, i have a callback specified that is getting ignored.
does this mean that i'm not hitting the 1.2.2 api that i'm intending to? there don't seem to be api specific endpoints for the oauth requests, just the rest of the api.
am i missing something? also, is it possible to set a callback if a user denies/cancels token authorization? i know that's not part of the oauth spec but would be really helpful.
am i missing something? also, is it possible to set a callback if a user denies/cancels token authorization? i know that's not part of the oauth spec but would be really helpful.
No, you're not missing anything. The SmugMug API doesn't honour the oauth_callback option as specified via the authorize.mg URL.
If you want to use the callback functionality, you need to predefine the callback URL in your control panel . See comment #28 in this thread for devbobo's response when I asked the same question
No, you're not missing anything. The SmugMug API doesn't honour the oauth_callback option as specified via the authorize.mg URL.
If you want to use the callback functionality, you need to predefine the callback URL in your control panel . See comment #28 in this thread for devbobo's response when I asked the same question
thanks a bunch!
one last question (hopefully)--
a lot of these get methods return a seemingly unbounded result set. is there any way to paginate the results, lets say with a ?max-results=N&offset=X ?
one last question (hopefully)--
a lot of these get methods return a seemingly unbounded result set. is there any way to paginate the results, lets say with a ?max-results=N&offset=X ?
one last question (hopefully)--
a lot of these get methods return a seemingly unbounded result set. is there any way to paginate the results, lets say with a ?max-results=N&offset=X ?
Not at the moment, but it's something I have wanted to do for some time.
Not at the moment, but it's something I have wanted to do for some time.
Even if we didn't have paging it would really be nice to have a way to query against the API. For example I would like to get all albums in a given category or all photos with a given keyword.
I am in the processing of implementing OAuth for the API. The first stage of the process was to refactor the API to make it possible to implement OAuth, as part of these changes I have done a lot of optimisation and implemented a few features that people having been asking for. So I am rolling this version out as a soft release, the released and beta api versions aren't going to change at this point as there is still quite a bit of work to complete the OAuth implementation.
Here's a list of changes in no particular order...
..........
ThemeID: ThemeID can now be set for smugmug.albums.create and smugmug.albums.changeSettings, and is returned by smugmug.albums.getInfo and smugmug.albums.get with Heavy=1.
..........
Hello,
I came across a small bug with Themes in 1.2.2. Specifically, for albums that have no specific theme set, smugmug.albums.get with Heavy=1 returns ThemeID=0. However, a call to smugmug.themes.get does not return any themes with an ID=0. Based on the listing of returned themes, it appears that the "default" theme has an ID=1. Therefore, it seems that albums with no theme set should have a ThemeID=1.
I came across a small bug with Themes in 1.2.2. Specifically, for albums that have no specific theme set, smugmug.albums.get with Heavy=1 returns ThemeID=0. However, a call to smugmug.themes.get does not return any themes with an ID=0. Based on the listing of returned themes, it appears that the "default" theme has an ID=1. Therefore, it seems that albums with no theme set should have a ThemeID=1.
Thanks
Hey David,
yes, I'm aware of this...it's not really an api bug...but I think I will need to put some code in to return ThemeID as 1 if it's set to 0 in the db.
yes, I'm aware of this...it's not really an api bug...but I think I will need to put some code in to return ThemeID as 1 if it's set to 0 in the db.
Cheers,
David
Great. Thanks.
As I'm starting to implement some features to use the new functionality of 1.2.2, I've got another question/request:
The new LastUpdated parameter in smugmug.albums.get to query for only albums after a given date is extremely useful. However, from doing some preliminary testing with this function, it seems the query is solely based on the last date a new photo was uploaded to an album. Other changes to an album (such as changes to Album settings, changes to album category/subcategory, deleting a photo from an album, etc) do not seem to trigger a change in the LastUpdated date. One feature of the software application I am developing displays and allows users to update their album settings. To be able to effectively cache the albums for this application, I am hoping there is a way to use the LastUpdated (or another API parameter) to return all albums that have been changed in any way (including changes to album settings, and changes to album category/subcategory) after the given date. Is there any way that this can be done?
BTW, the new functions and updates in 1.2.2 are very impressive.
I ran across a bug in 1.2.2 with smugmug.albums.changeSettings. If you pass an empty "Password" parameter to clear the album's password, 1.2.2 ignores it and the current password remains active. This is not an issue in 1.2.0, so it appears to be a new bug in 1.2.2.
I get the same error if I just remove the ProductID parameters.
I tried this with both the 1.2.1 and 1.2.2 endpoints.
Any suggestions?
Yes, unfortunately recent changes to support Bay photo have broken all my propricing methods and due to the nature of those changes the pro-pricing needs to be rewritten in a different form, which probably won't happen until 1.2.3.
OAuth API complete?
I am trying to get acclimated to the API and seeing that I already have a framework for OAuth in my application I WAS happy to find implementation listed in documentation. The challenge is which documentation is up to date?
Anyhow, IS API 1.2.2 officially released? Are all the API methods supported via OAuth now? if Not then when?
I have made it through the Authentication/Login process, but can't seem to find right method name to call using OAuth for the smugmug.albums.get method. The call return the html stream for SMugMug.com.
The calls are identical between OAuth or not, except with OAuth, you can leave off the sessionid parameter. That little tidbit hasn't made it's way into the docs yet.
Also, 1.2.2 is in beta, as is 1.2.1. They'll make their way out as the 'official' release eventually, but you're pretty safe in using them for whatever you're building.
Comments
Hmmm, may be missing something here, but the following methods don't seem to do anything or offer any response, even when using deliberately incorrect information:
albums.applyWatermark, albums.removeWatermark, images.applyWatermark, images.removeWatermark, images.rotate, images.zoomThumbnail and images.crop
More importantly, if you don't specify an AlbumID when changing the settings of an image using images.changeSettings, it gets assigned an AlbumID of 0 instead of keeping it's original AlbumID like it does with the other revisions of the PHP endpoint.
I kept a record of the ImageID and ImageKey for one of the images that "disappeared" and used images.getInfo to "find" it and this is what is returned:
See, AlbumID is now 0 and the key is blank. This image is no longer accessible.
Personal Blog | Tech Blog | phpSmug
SmugMug API Developer
My Photos
Hi there
Another inconsistency/bug:
It appears propricing.getImage and propricing.getAlbum don't acknowledge the new Strict=0 functionality. They always return an error response (old behaviour) even if Strict=0 is explicitly stated.
Personal Blog | Tech Blog | phpSmug
Hi,
I am in process of integrating 1.2.2 API into our service. When the user hits the authorization URL, there is only one option "Access photos from your public galleries". But after authorization, if the user goes to the control panel, then he/she can select "Full Access".
So is there a way to give the option of access right at the authorization stage?
Thanks,
Rakesh
Hi Rakesh,
Yes, sorry I'm a bit lagged with the full documentation, when you call the authorize url, you can send the following parameters...
&Access=[Public or Full]
&Permissions=[Read, Add or Modify]'
Cheers,
David
SmugMug API Developer
My Photos
Thanks David!:D
http://api.smugmug.com/services/api/rest/1.2.2/?method=smugmug.albums.get&Heavy=true
But, when I try to fetch photos for a given album ID, using
http://api.smugmug.com/services/api/rest/1.2.2/?method=smugmug.images.get&AlbumKey=XYZ&Heavy=true , I am getting
Any idea why this might be happening ? <img src="https://us.v-cdn.net/6029383/emoji/ne_nau.gif" border="0" alt="" >
Looks like we've got some sort of regression in watermarks.create(): it's continually returning error #16 - "invalid data (invalid Dissolve parameter)".
This occurs regardless of whether a dissolve param is supplied or not.
As before, I'm using the PHP endpoint.
Personal Blog | Tech Blog | phpSmug
This new API version looks good; however, there seem to be errors in the documentation.
For instance, in http://wiki.smugmug.net/display/API/smugmug.albums.create+1.2.2, the TemplateID parameter should be AlbumTemplateID (specifying TemplateID simply does not do anything useful and results in galleries with corrupt settings).
Is there a technical/formal documentation (like a WSDL or something) that would reflect the actual implementation in the system? Right now, there is quite a bit of try/error involved...
Regards,
Leo
Answers below...
That's not actually correct, AlbumTemplateID and TemplateID are two seperate parameters.
AlbumTemplateID corresponds to an AlbumTemplate holding gallery/album options.
TemplateID corresponds to the style template used for view the gallery, eg Viewer Controlled, SmugMug, Journal, etc. The full list can be obtained by calling method smugmug.styles.getTemplates.
I'm in the process of implementing something like this for api 1.2.2, which will be used to autogenerate the api documentation. You can see a preview of it here.
Cheers,
David
SmugMug API Developer
My Photos
When trying to call smugmug.albums.getStats using the REST endpoint, I am getting the following response:
Is this expected?
Yup. As the very first entry on this topic and the message states, the stats methods have not been implemented in the 1.2.2 API yet
Personal Blog | Tech Blog | phpSmug
Thanks. I figured I would ask to see if anything had changed since April when this thread was created.
is this the right place to ask about oauth problems too? it seemed like 1.2.2 and oauth are linked, so here's my question:
i am able to get an oauth request token and i can authorize it as well. however in my authorize url, i have a callback specified that is getting ignored.
i'm sending users to :
http://api.smugmug.com/services/oauth/authorize.mg?oauth_token=[token omitted]&oauth_callback=http%3A%2%2Fsome.url.here%2Fservices%2Fsmugmug%2Fcallback%2F
assuming this would redirect successful authorizations to
http://some.url.here/services/smugmug/callback/?oauth_token=[same token omitted]
but instead i merely get the confirmation "my app" was added to your Authorized Applications, without the callback.
while doing some forensics, i noticed that in the headers of my navigation, to http://api.smugmug.com/services/oauth/*
there is the header "X-Powered-By: smugmug/1.2.0"
does this mean that i'm not hitting the 1.2.2 api that i'm intending to? there don't seem to be api specific endpoints for the oauth requests, just the rest of the api.
am i missing something? also, is it possible to set a callback if a user denies/cancels token authorization? i know that's not part of the oauth spec but would be really helpful.
No, you're not missing anything. The SmugMug API doesn't honour the oauth_callback option as specified via the authorize.mg URL.
If you want to use the callback functionality, you need to predefine the callback URL in your control panel . See comment #28 in this thread for devbobo's response when I asked the same question
Personal Blog | Tech Blog | phpSmug
thanks a bunch!
one last question (hopefully)--
a lot of these get methods return a seemingly unbounded result set. is there any way to paginate the results, lets say with a ?max-results=N&offset=X ?
Unfortunately not.
Personal Blog | Tech Blog | phpSmug
Not at the moment, but it's something I have wanted to do for some time.
SmugMug API Developer
My Photos
Even if we didn't have paging it would really be nice to have a way to query against the API. For example I would like to get all albums in a given category or all photos with a given keyword.
I came across a small bug with Themes in 1.2.2. Specifically, for albums that have no specific theme set, smugmug.albums.get with Heavy=1 returns ThemeID=0. However, a call to smugmug.themes.get does not return any themes with an ID=0. Based on the listing of returned themes, it appears that the "default" theme has an ID=1. Therefore, it seems that albums with no theme set should have a ThemeID=1.
Thanks
Hey David,
yes, I'm aware of this...it's not really an api bug...but I think I will need to put some code in to return ThemeID as 1 if it's set to 0 in the db.
Cheers,
David
SmugMug API Developer
My Photos
Great. Thanks.
As I'm starting to implement some features to use the new functionality of 1.2.2, I've got another question/request:
The new LastUpdated parameter in smugmug.albums.get to query for only albums after a given date is extremely useful. However, from doing some preliminary testing with this function, it seems the query is solely based on the last date a new photo was uploaded to an album. Other changes to an album (such as changes to Album settings, changes to album category/subcategory, deleting a photo from an album, etc) do not seem to trigger a change in the LastUpdated date. One feature of the software application I am developing displays and allows users to update their album settings. To be able to effectively cache the albums for this application, I am hoping there is a way to use the LastUpdated (or another API parameter) to return all albums that have been changed in any way (including changes to album settings, and changes to album category/subcategory) after the given date. Is there any way that this can be done?
BTW, the new functions and updates in 1.2.2 are very impressive.
Thanks for all your help.
Hello,
I ran across a bug in 1.2.2 with smugmug.albums.changeSettings. If you pass an empty "Password" parameter to clear the album's password, 1.2.2 ignores it and the current password remains active. This is not an issue in 1.2.0, so it appears to be a new bug in 1.2.2.
Thanks
method=smugmug.propricing.getPortfolio&SessionID=<sessionID>
I get the same error if I just remove the ProductID parameters.
I tried this with both the 1.2.1 and 1.2.2 endpoints.
Any suggestions?
Yes, unfortunately recent changes to support Bay photo have broken all my propricing methods and due to the nature of those changes the pro-pricing needs to be rewritten in a different form, which probably won't happen until 1.2.3.
SmugMug API Developer
My Photos
I am trying to get acclimated to the API and seeing that I already have a framework for OAuth in my application I WAS happy to find implementation listed in documentation. The challenge is which documentation is up to date?
Anyhow, IS API 1.2.2 officially released? Are all the API methods supported via OAuth now? if Not then when?
I have made it through the Authentication/Login process, but can't seem to find right method name to call using OAuth for the smugmug.albums.get method. The call return the html stream for SMugMug.com.
Any guidance or direction?
Thanks
Also, 1.2.2 is in beta, as is 1.2.1. They'll make their way out as the 'official' release eventually, but you're pretty safe in using them for whatever you're building.
Of course, you have to pass all the OAuth parameters and properly sign it, too.
http://wiki.smugmug.net/display/API/show+1.2.2?method=smugmug.albums.get
SmugMug API Developer
My Photos