Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt Monday at 02:04 PM
tsdevelopment Posted October 14, 2017 Posted October 14, 2017 This is the support/feature request thread for (itzrest) Rest API with authentication. Feel free to discuss or request new endpoints / tell me about errors or security issues. Brogrammer 1
Gilly Posted October 26, 2017 Posted October 26, 2017 Hey tsdevelopment, What is the proper argument to pass when authenticating and login with the 32 key
tsdevelopment Posted October 29, 2017 Author Posted October 29, 2017 On 26.10.2017 at 6:58 PM, Gilly said: Hey tsdevelopment, What is the proper argument to pass when authenticating and login with the 32 key Sorry, did not get a notification about your post. Everything you need is described here: Make authorized requests For authorized requests you need an access token. Append the access token as authorization header and make your request: curl \ -H "Authorization: Bearer <token>" \ -X <baseurl>/restapi/forums You can validate if your token is valid by sending a request to the /auth/authenticate endpoint: curl \ -H "Authorization: Bearer <token>" \ -X POST <baseurl>/restapi/auth/authenticate In this example I use curl, but you can use other clients. Does it help or can you please specify your question a little bit more?
tsdevelopment Posted October 30, 2017 Author Posted October 30, 2017 You can login with usernamen and password like that: Login as user To login as a user you must send a POST Request to the /auth/login endpoint with your username and password: curl \ -d username=max\ -d password=secret\ -X POST <baseurl>/restapi/auth/login For further requests you use the token as header. Brogrammer 1
DrumScorps Posted December 12, 2017 Posted December 12, 2017 On 10/14/2017 at 3:10 PM, tsdevelopment said: This is the support/feature request thread for (itzrest) Rest API with authentication. Feel free to discuss or request new endpoints / tell me about errors or security issues. Would it be possible to add a few more user data items to the login endpoint response? user email user profile url username/display name (i'm not sure whats returned in your "name" field, but in my case i need both username and displayname) Brogrammer 1
tsdevelopment Posted December 13, 2017 Author Posted December 13, 2017 On 12.12.2017 at 6:02 PM, DrumScorps said: Would it be possible to add a few more user data items to the login endpoint response? user email user profile url username/display name (i'm not sure whats returned in your "name" field, but in my case i need both username and displayname) Yes, it is possible. I will do it during the next few days. Brogrammer 1
DrumScorps Posted December 13, 2017 Posted December 13, 2017 13 minutes ago, tsdevelopment said: Yes, it is possible. I will do it during the next few days. Excellent! Thanks for putting this together, btw. I've been looking for a way to authenticate users via http requests and this does just the trick.
tsdevelopment Posted December 14, 2017 Author Posted December 14, 2017 On 13.12.2017 at 7:25 PM, DrumScorps said: Excellent! Thanks for putting this together, btw. I've been looking for a way to authenticate users via http requests and this does just the trick. I uploaded a new version a few moments ago. The member structure now includes the following fields: name - The display name nameSeo - The seo name profileUrl - The url to the member profile of the user email - The member email address. Be careful with this value. Maybe I will implement a little bit more security so that a this value will only be set if a mamber is admin or the member equals the current one. Hope that will help you! Brogrammer 1
DrumScorps Posted December 14, 2017 Posted December 14, 2017 5 minutes ago, tsdevelopment said: I uploaded a new version a few moments ago. The member structure now includes the following fields: name - The display name nameSeo - The seo name profileUrl - The url to the member profile of the user email - The member email address. Be careful with this value. Maybe I will implement a little bit more security so that a this value will only be set if a mamber is admin or the member equals the current one. Hope that will help you! Perfect. Thank you!
Brogrammer Posted December 22, 2017 Posted December 22, 2017 On 10/14/2017 at 10:40 PM, tsdevelopment said: This is the support/feature request thread for (itzrest) Rest API with authentication. Feel free to discuss or request new endpoints / tell me about errors or security issues. Hello @tsdevelopment, nice work! Can we Add or Edit a topic (or post or message) for example? or can we just GET that information? is meaning like official API https://invisioncommunity.com/developers/rest-api?endpoint=forums/posts/POSTindex On 12/14/2017 at 10:53 PM, tsdevelopment said: I uploaded a new version a few moments ago. The member structure now includes the following fields: name - The display name nameSeo - The seo name profileUrl - The url to the member profile of the user email - The member email address. Be careful with this value. Maybe I will implement a little bit more security so that a this value will only be set if a mamber is admin or the member equals the current one. Hope that will help you! Great!I suggest adding the member ID and photoUrl to it as well. Of course, if we can get the all information like official api, it will be much better. https://invisioncommunity.com/developers/rest-api?endpoint=core/members/GETitem This app is great and I think it will be very useful! even may be much better than official API ! Thank you.
tsdevelopment Posted December 23, 2017 Author Posted December 23, 2017 19 hours ago, Brogrammer said: Hello @tsdevelopment, nice work! Can we Add or Edit a topic (or post or message) for example? or can we just GET that information? is meaning like official API https://invisioncommunity.com/developers/rest-api?endpoint=forums/posts/POSTindex Great!I suggest adding the member ID and photoUrl to it as well. Of course, if we can get the all information like official api, it will be much better. https://invisioncommunity.com/developers/rest-api?endpoint=core/members/GETitem This app is great and I think it will be very useful! even may be much better than official API ! Thank you. Hello, thank you for your post. At the moment it is only possible to GET data from the api. But I am working very hard to implement other methods like POST, PUT and DELETE. It costs a lot of time to test everything and implement the different validators for the different Nodes and its fields. The API was introduced to myself for one of my projects. So the returned data is different from the official API. If you need more output I can implement it in a few hours.
tsdevelopment Posted April 9, 2018 Author Posted April 9, 2018 On 21.3.2018 at 5:41 PM, ArMaTeC said: any chance of some php examples? Sorry, I didn't get a notification about your answer. What exactly do you want? Raw PHP? Curl? Guzzle? By the way: since we can use oauth2 I don't know if it makes sense to continue the plugin... maybe other people can say if they would use it or not.
JEFF MACK Posted August 1, 2018 Posted August 1, 2018 Whenever i try to do anything like https://forum.mysite.com/restapi/auth/authenticate, it tells me that the page doesn't exist. What am I missing?
tsdevelopment Posted October 4, 2018 Author Posted October 4, 2018 On 8/1/2018 at 4:30 AM, JEFF MACK said: Whenever i try to do anything like https://forum.mysite.com/restapi/auth/authenticate, it tells me that the page doesn't exist. What am I missing? Sorry for my delayed answer. It's true, there is an error in my plugin. But since there is an official API I don't think it makes any sense to develop the plugin further. The plugin is not used by many members. So I have to look if I will delete it or bring it to the next level.
balazsp Posted October 26, 2021 Posted October 26, 2021 @tsdevelopment I like how you extended the original API functionality... 🙂 kudos! Just a quick question... Is there a way to list the forum posts with a unique reaction?
Recommended Posts