ComputerScienceHouse / WebDrink-2.0

Rewrite of CSH WebDrink. Includes updated interface and new API.
https://webdrink.csh.rit.edu
10 stars 6 forks source link

API endpoint for GET /users/info/ with only API key #55

Closed sman591 closed 9 years ago

sman591 commented 9 years ago

Currently, the API requires a UID, iButton, or for the current user to be logged in to CSH to get a user's info.

I think if the request provides an API key, it should not require either of those. Example:

https://webdrink.csh.rit.edu/api/index.php?request=users/info/&api_key=myApiKey

bencentra commented 9 years ago

I believe it does work with just the API key. Try it with your API key, it just worked for me.

In the code: https://github.com/bencentra/WebDrink-2.0/blob/master/api/drink_api.php#L352-L366

It definitely isn't documented though, so I'll fix that soon!

sman591 commented 9 years ago

Looks like it does! Sorry about that, I must've typed my API key wrong when I tried last night.