Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

sample code


the link posted inside "Help with authentication" has been removed. can anyone please post any sample code which does authentication / posting once again?



  • Options
    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)

    all the calls that need authentication require having a transient key, you can get that by making a call to this controller:

    so basically, after the user has logged in (or you have some sort of single sign on implemented), make a call to


    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:

    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!
  • Options
    There is a native api for most things.

    grep is your friend.

  • Options
    True, but adding to a discussion is not part of the native API (at least, according to that page).
  • Options
    x00x00 MVP
    edited October 2011
    What I'm saying is it would be better to extend that

    why not use

    GET /post/discussion

    pick up transient key then



    That is the whole point of mating MCV with REST. It is not really REST if the resources are in different places.

    grep is your friend.

  • Options
    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?
Sign In or Register to comment.