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.
How can I use Simple API?
BadVolt
New
Regarding to API documentation and changelog I must find a module called 'Simple API', but there's nothing like that in native addons or community addons. Is it available in open-source version? And if it is, how can I actually use it?
Thank you
0
Comments
Oh, I see. Looks like it's only available for hosted forums.
Source: https://github.com/vanilla/vanilla/issues/5759
With Vanilla 2.5 the API is also included in the OS version. But I must confess that I have no clue on how to work with it.
You might be able to find out more by looking at the sources:
https://github.com/vanilla/vanilla/tree/release/2.5a/applications/vanilla/controllers/api
https://github.com/vanilla/vanilla/tree/release/2.5a/applications/dashboard/controllers/Api
Hm. It sounds like I will need my MITM proxy server.
Main idea is to integrate this forum with my application. Accounts, roles, badges and so on. And if I can use jsConnect to login user with my application profile, I can't do the same with badges and etc.
Vanilla 2.5 has a massive amount of new features on that end and I don't think there is much knowledge about that here on the forum. But from what I know, you can use JSON web tokens:
https://github.com/vanilla/vanilla-connect-php
https://github.com/vanilla/vanilla/search?utf8=✓&q=jwt&type=
For using the api you shouldn't be bound to jsConnect any more.
Sounds great But I'm not as good in PHP. Most Node.js developer. But if I get sth useful from this API, I'l definitely create a npm module for it.
p.s. App is hardcoded to one forum, login attempt results in bad getaway and discussions are full of spam-bots already
I've found this: https://docs.vanillaforums.com/apiv2/swagger/#/
Looks like it is a good start, e.g.: https://open.vanillaforums.com/api/v2/discussions/35718?expand=true
But from a quick look I miss a way to get all comments from a discussion ID and authentication isn't explained, too. I assume you will not need much PHP knowledge at all. After all that's what an API is made for.
Oh, mate. Thank you very much. It's exactly what I was looking for. Auth is per-user, user-generated API key in user settings transferred in headers.
But looks like there's no way to give badges to users with this native api
There are no badges in Vanilla OS...
They are part of the hosted version. There is an application called YAGA which could be used for that, but it wouldn't support assigning badges per api without shooting php code...
Just released vanillaConnect server-side port to Node.js
Feel free to use it
Awesome!