PDA

View Full Version : invalid API key


yoxigen
May-23-2010, 02:47 PM
Hi,

I'm just starting to work with the smugmug API, and all I'm getting is this error (code 18).
Here is the URL I'm using:

http://api.smugmug.com/hack/json/1.2.0/?APIKey=avjvFZ3IY8s82IlBUTw2XtWBdUl9Eixp&method=smugmug.albums.get&NickName=yoxigen

Am I doing something wrong? Or is there a waiting period, during which my API key is inactive?

Thanks,
Yossi.

udy
May-25-2010, 05:43 AM
I think you need a SessionID to be set, after the login. Did you log in? See the login api. The APIKey is only needed at the log in stage. You'll receive the SessionID with the login response. And use SSL for the log in.

Have I just used that 6 times? LOL

yoxigen
May-27-2010, 10:08 AM
I think you need a SessionID to be set, after the login. Did you log in? See the login api. The APIKey is only needed at the log in stage. You'll receive the SessionID with the login response. And use SSL for the log in.

Have I just used that 6 times? LOL

Thanks very much Udy!

It'd be great if it would be specified somewhere in the API documentation though. I don't think it's very usual to require login for API operations, especially if the login is anonymous.

Now smugmug support in YoxView (http://yoxigen.com/yoxview) can happen. :)

udy
May-27-2010, 10:25 AM
Thanks very much Udy!

It'd be great if it would be specified somewhere in the API documentation though. I don't think it's very usual to require login for API operations, especially if the login is anonymous.

You're welcome.

Take a look at:

http://wiki.smugmug.net/display/SmugMug/smugmug.login.anonymously+1.2.0

Happy development :-)