OAuth upload issues

taaztaaz Registered Users Posts: 1 Beginner grinner
Hi, I've been slowly writing my own OAuth based uploader tool and am having a few difficulties. The code works fine if calling something like smugmug.albums.get, but for uploads it's wacky. I've got some code I was running a month ago, and it would randomly either successfully upload an image or fail for some reason I forget. The other day it worked a few times in a row then started failing. Now it fails always. This random output for the same input is odd enough, but even the failures are random. It now fails in one of two ways: ~80% of the time with code 1, and ~20% of the time with code 35.

I get back one of the following "200 OK" JSON failure responses:

{
"stat": "fail",
"code": 1,
"message": "We're sorry, but you don't appear to be logged in to that account. Please login and try again."
}

{
"stat": "fail",
"code": 35,
"message": "invalid signature"
}

The same OAuth credentials work for other calls, so I assume they are ok. I have no idea what that code 1 message even means in the context of OAuth. Getting a new token doesn't fix it. The code 35 response is also odd since it's the exact same request as the first call as far as I can tell. It might very well be some edge case in the Python OAuth lib I'm using but I kind of doubt it.

Any hints on what to look for to fix this?

I assume using "200 OK" for the failure responses is a bug?

Also, please document the upload failure codes:
http://wiki.smugmug.net/display/API/Uploading

Thanks for any help.

-dave

Comments

Sign In or Register to comment.