Quantcast
Channel: Digital Grin Photography Forum - SmugMug APIs, Hacks & Tricks
Viewing all 147 articles
Browse latest View live

Non-OAuth Photo Upload with iOS???

$
0
0
I *had* planned a business where my mobile iOS app, used by scores of customers (none of whom would have a SmugMug account), would upload photos to a single, MY SmugMug account under individual Categories/SubCategories, and I would distribute revenue based on their sales. The mobile app is developed but the hurdle is figuring out with the API how they all can upload photos to MY account.

The latest API, 1.3, seems to be completely dependent, especially for uploads, on OAuth which is based on the model where individual users access THEIR SmugMug accounts without the app using their username/password. I don't see how I could use the latest API at all for my business model. The older API would seem to work better with my model (my username/password would be encrypted and safe on the device).

So, 1) is there anyway possible to use 1.3 and have end-users, who do not have a SmugMug account, upload photos to my account, 2) why can't I use an earlier API, and 3) does anyone know of *new* example code, especially for iOS/Objective-C for uploading to one SmugMug account?

Thanks for any tips and thoughts.

Upload System Error #5: Invalid Album???

$
0
0
A new thread... I successfully uploaded an image using the provided code in another thread. But I tried a hundred times to upload other images, one at a time, using what I thought was identical code with AFNetworking (using a custom HTTPclient and a multipart form), it showed the progress of the upload (that took about 20s), and even finishes the upload with a successful response code but I get back:

Code:

{"stat":"fail","method":"smugmug.images.upload","code":5,"message":"system error"}
And when I check the Upload Log in SmugMug it says, "upload problem, invalid album". Well, it is the very same albumID that I can repeatedly use in the working code (not multipart form-data).

So, I'm at a lost whether the multipart AFNetworking stuff is the problem, or something on the SmugMug API end of things.

Any thoughts? Is there a way for SmugMug to provide more specific details about the error in their logs?

Thanks.

BUG: Different Behavior with Login Approaches

$
0
0
With API 1.2.2, I can successfully log in with either smugmug.login.withPassword or smugmug.login.withHash and get a sessionID. However, when I first log in with the Hash approach and then try to get.Albums (and get.Categories if I remember), even when I send along my API key, even though it is not specified as required (only the sessionID is required according to the docs), the status is "fail" and the reason is "Invalid API key". So, in order to get things to work the first time around, I have to send my email address and password along instead of a userID and Hash. I feel it should not matter which method is chosen first and that's why it is a bug.

Now, to help you find this bug, once I have successfully logged on via email/password and get the new sessionID and then get the Albums with that new sessionID, THEN the next time I log in, I can switch to the Hash login method, get a new sessionID, and then get.Albums works without the Invalid API key message!

It seems a successful login via email/password sets some flag on the server that does not get set when the userID/hash method is used.

Problem with API auth on Tizen browser

$
0
0
Hi,

I work at litl on the Woven app, see woventheapp.com. We support aggregation of photos from Smugmug to our mobile apps.

Our backend website takes the user to the smugmug authentication page, then aggregates the user's photos through the smugmug API.

We have recently ported our application to tizen (tizen.org). There we are encountering a problem with the authentication site. After entering the credentials, the user is redirected to the same login page. Upon entering the credentials again, the user is presented with a page that says the app is not trusted by Smugmug. This doesn't occur on our other platforms (iOS, Android, Windows Phone)

Thanks

phpSmug and CURL Error 7

$
0
0
Today for at least a couple hours I was receiving an error on my website using phpSmug and the PHP API. When the error was present and the code was on my home page it took a very long time for the code to throw an error and kept the rest of the home page from loading until it did.

It is working now, a test page is here http://davenelson.com/scripts/portfolio.php, but I am concerned about the effects of the error killing the performance of my web site and am not putting it back on my home page until I find a fix.

On the "discovery" tab under API Keys, I did not previously have the URL for my app, did that cause the error?

I plan on using this code on multiple pages, does each page need a unique API Key so that it can have a unique URL?

One thing I plan on doing is loading the entire thing using AJAX so it will not affect the performance of the home page and the other is putting some default images in the error block so that it will at least show something when the error occurs.

But I need to know, what causes this error and how do I fix it so that I never see it again?


P.S. About the app
I am using phpSmug to anonomously retrieve the URLs and Captions for the images in a gallery and insterting them into a JavaScript that uses Fotoramajs, a jQuery slideshow library, to display the images and captions in a responsive design that works great on all devices.

smugmug.images.getURLs no longer working for me

$
0
0
I haven't touched my app in a long time, I just got a report it's not working, so I thought I'd check it out.

I'm making the following API call?

http://api.smugmug.com/services/api/...5908e880df0354

And I get the following response?

<?xml version="1.0" encoding="UTF-8"?> <rsp stat="fail"><method>smugmug.images.getURLs</method><err code="4" msg="invalid user (invalid Password parameter)"/></rsp>

Why do I need a password when my session is already authorized? The docs say only SessionID, ImageKey and ImageID are required.

Thanks

System Error

$
0
0
I'm starting work using your API, specifically the smugmug.images.get method. I'm using http://api.smugmug.com/services/api/...ey=my-albumkey, but it returns a code 5, system error. Using the getURLs method returns correctly, when I use http://api.smugmug.com/services/api/...eID=my-imageid. Any idea why I'm getting the code 5 system error on the smugmug.images.get? Any help is appreciated, thanks!

Also, dgrin registration is buggy. It didn't like my mail.missouri.edu email account. Also, "the sum of five and three" can be 8, "eight", or "Eight". Another question, who is Yosimite's most famous photographer, could not be answered by the three, Three, 3, college graduates here :)

Images getInfo without OriginalURL

$
0
0
Hi,
I just encountered an issue with my API implementation. It was assuming each image would have an OriginalURL, but for a users images I've encountered a set of pictures that are missing this attribute. I can get an X3LargeURL, but not an OriginalURL.

In what context would an image not have an OriginalURL? What would be the highest fidelity way to download an image that doesn't have an OriginalURL?

Ben

API Hel Favorites and events

$
0
0
I am looking for information on the API (if any are available) for the following:

1) Events connection
2) Allowing customers to register through the API for an event when registration is required
3) Favorites API for events

Any help on these would be greatly appreciated.

Also, it appears as if events are created off of an existing gallery or they are creating galleries as normal but are just associated to an event. Would the gallery or sub category etc. API work in the same manor with an event?

Thank you
John Kasko
My Proofs

Accessing password protected gallery throw 'smugmug.albums.browse' method

Intermittent "Invalid API key" error on ASP.NET

$
0
0
I have a ASP.NET web application that acts as an API service for a photography-related mobile app. Occasionally, the web application is not able to communication with SmugMug. The SmugMug API returns error "invalid API key."

Once the error occurs the first time, it is returned after every subsequent request to the SmugMug API. In troubleshooting, I have discovered that if I rename the Web.config file and immediately rever it to its original name, the errors from SmugMug disappear and the calls to the API resume working correctly.

This fix is temporary, however. The error will return after a few days.

How might I begin debugging this issue?

Any Word on the API and the new SmugMug?

$
0
0
I just watched the unveiling of the new SmugMug. Very cool! Congrats on the new release - I know it was a lot of work and a long time coming. But VERY impressive!

The question(s) is(are...

it all seems so different, how will the API be effected, if at all?

Will there be the ability to send customization info, like we could to the old version? For example, it looks like you can design a theme and define custom CSS - would we be able to do that programmatically?

Are there any new calls for being able to create pages, folders, menus, etc. via API?

I am guessing existing calls to grab galleries and images would still work but would the new folder system of organization mess with that at all?

Thanks for any information you can provide!

Creating a top level album without a category

$
0
0
Using the API 1.3.0 how do you create an album at the root, that is not part of any categories? Passing in CategoryID of 0 assigns it to "Other" and is nested.

API 1.2 - smugmug.categories.get -- category IDs changed?

$
0
0
I'm the author of SnugUp and had reports that the application was crashing when loading categories. After a little bit of investigation, I found that the call to
Code:

sumgmug.categories.get
no longer returns the same category IDs as it was previously.

My code unfortunately had assumed that the category ID would remain and when it matched IDs, now fails as the categories that once existed no longer do (or they have new IDs). I've got such a jumble of category junk in my SmugMug photo site after testing my application for these years, that I couldn't be certain if:

a) the IDs in fact have changed (bummer)
b) or some IDs are no longer being returned (bummer)

Given the crashes my application users are facing, it's difficult to tell (as the issue manifests both ways).

I couldn't find any documentation explaining the changes.

Anyone else notice this issue? Or any other comments that might help?

For now, I'm going to just patch my code and suggest users reselect an upload category in SnugUp.

Image Key

$
0
0
On the legacy SmugMug, the image ID *and* key was available in the URL. This allowed me to grab various images sizes and EXIF from the (non-authenticated) API.

Since the redesign, only the ImageID is available in the URL. Is there no way to glean this apart from logging in using oauth? Surely security concerns are taken care of by the use of the API key.

Title

$
0
0
Any chance of getting the 'title' field passed through to the response?

RSS for PhotoVu

$
0
0
Just wanted to share the latest working RSS format for the legacy PhotoVu picture frames www.photovu.com/ (the company doesn't exist anymore, their premium frames do)...

After some trial and error I found that

http://[your nickname].smugmug.com/hack/feed.mg?Type=gallery&Data=[AlbumID]_[ AlbumKey]&format=rss200&ImageCount=200&Paging=0&Size=Origin al

works well to download pictures with their original size – and in excess of 100 pictures for larger galleries. You may need to adjust Image Count=200 to be larger than the size of your gallery.

In relation to Smugmug Designs and WP Themes

$
0
0
Has anyone released or found any wordpress themes that are similar in design to the new Smugmug Designs?

So for instance, I'm using the Moss Design and would like a similar WP theme.

Thoughts? Ideas?

Here's my smugmug site for a better idea - http://mstrozewski.smugmug.com

Or, when will Smugmug choose to incorporate a blog section like Zenfolio did a while back?

Smugmug API 1.3.0 - Authentication / Getting Started

$
0
0
Can someone point me to some sample code showing how to setup the authentication with the 1.3.0 API? I've been trying to search for something but haven't found anything.

Older version of Send to Smugmug

$
0
0
Does anyone know where I can find an older version Send to Smugmug? I made the mistake of updating to the latest today which keeps crashing/not finishing uploads. If anyone can share the version 1.3.0324.0 with me, that'd be great.

Thanks.
Viewing all 147 articles
Browse latest View live