This discussion is related to the api (json) addon.
hi,
the link posted inside "Help with authentication" has been removed. can anyone please post any sample code which does authentication / posting once again?
sorry, don't have code on me right now to post, but i can detail out the process (be aware, this is on an older version of vanilla, i have not worked with the newer version as of yet)
sorry, this is not fully documented, i don't use it anymore so haven't had the need. i don't even know if it works with recent versions of vanilla. feel free to push updates if you want to better document it!
Agreed - Extending the current API would be fantastic (I just posted a question in the forums about that). Have you looked into doing that or do you know someone who is working on it?
Answers
all the calls that need authentication require having a transient key, you can get that by making a call to this controller: https://github.com/eleith/vanilla-api-addon/blob/master/controllers/class.sessioncontroller.php
so basically, after the user has logged in (or you have some sort of single sign on implemented), make a call to
/api/session
what you get back is the users transientkey. (a generated string that will work for that session)
then make a call to any other controllers and pass that key in
/api/discussion/add (POST:Discussion/CategoryID, Discussion/Body, Discussion/Name, Discussion/TransientKey)
the above are the key values you need to pass in form that call, you can see the other apis supported here: https://github.com/eleith/vanilla-api-addon
sorry, this is not fully documented, i don't use it anymore so haven't had the need. i don't even know if it works with recent versions of vanilla. feel free to push updates if you want to better document it!
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •http://vanillaforums.org/docs/api
Don't PM about development, I'm not currently taking on clients.
grep is your friend.
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •why not use
GET /post/discussion
pick up transient key then
POST
/post/discussion
That is the whole point of mating MCV with REST. It is not really REST if the resources are in different places.
Don't PM about development, I'm not currently taking on clients.
grep is your friend.
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •