Jump to content

Community

(itzrest) Rest API with authentication


Recommended Posts

  • 2 weeks later...
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?

Link to post
Share on other sites
  • 1 month later...
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)
Link to post
Share on other sites
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.

Link to post
Share on other sites
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!

Link to post
Share on other sites
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!

Link to post
Share on other sites
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.

 

Link to post
Share on other sites
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.

Link to post
Share on other sites
  • 2 months later...
  • 3 weeks later...
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.

Link to post
Share on other sites
  • 3 months later...
  • 2 months later...
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.

Link to post
Share on other sites
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...

Important Information

We use technologies, such as cookies, to customise content and advertising, to provide social media features and to analyse traffic to the site. We also share information about your use of our site with our trusted social media, advertising and analytics partners. See more about cookies and our Privacy Policy