Invision Community 4: SEO, prepare for v5 and dormant account notifications Matt November 11, 2024Nov 11
Posted October 14, 20177 yr 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.
October 26, 20177 yr Hey tsdevelopment, What is the proper argument to pass when authenticating and login with the 32 key
October 29, 20177 yr Author On 10/26/2017 at 4: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?
October 30, 20177 yr Author 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.
December 12, 20177 yr On 10/14/2017 at 7: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)
December 13, 20177 yr Author On 12/12/2017 at 5: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.
December 13, 20177 yr On 12/13/2017 at 6:10 PM, 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.
December 14, 20177 yr Author On 12/13/2017 at 6: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!
December 14, 20177 yr On 12/14/2017 at 7:23 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! Perfect. Thank you!
December 22, 20177 yr On 10/14/2017 at 7: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. 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 7:23 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.
December 23, 20177 yr Author On 12/22/2017 at 7:10 PM, 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.
April 9, 20186 yr Author On 3/21/2018 at 4: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.
August 1, 20186 yr 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?
October 4, 20186 yr Author On 8/1/2018 at 2: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.
October 26, 20213 yr @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?