Options

Bad URLs returned by API

David PLDavid PL Registered Users Posts: 80 Big grins
Hello,

Using API 1.3.0, the URLs returned by smugmug.images.get and smugmug.images.getURLs return URLs that cannot always be resolved when (1) you are accessing as guest and (2) the gallery has a gallery password (which is properly included in the API call).

Here is an example:

The following call to smugmug.images.getURLs:


returns the following URLs (the parts in red seem to be the problem):

<rsp stat="ok">
<method>smugmug.images.getURLs</method>
<Image id="1581884759" Key="QbM7pGm" LargeURL="http://photos.smugmug.com/Family/Powell/JRP/i-QbM7pGm/1/vtgZ5gW3MaQpqt7K1Zc4q8r79eI%3D-1322957305-L/JRP0001-L.jpg" MediumURL="http://photos.smugmug.com/Family/Powell/JRP/i-QbM7pGm/1/ndaqubQUgMyom337vSsqnQvuyiQ%3D-1322957305-M/JRP0001-M.jpg"
--snip--

It appears the response is adding the part in red, which causes the URLs to frequently result in 404 errors. The urls do sometimes resolve, but it seems to be less than 10 percent of the time and some never will resolve. Again, this seems to be specific to accessing galleries as guest with a gallery password. The gallery in this example does have External links enabled, it's just that the URL's returned by the API do not properly resolve.

Thanks
Sign In or Register to comment.