petersmithca / humhub-api

Implements a JSON RESTful API for HumHub
27 stars 16 forks source link

Getting access to user id for subsequent API calls. #38

Closed csaurav closed 7 years ago

csaurav commented 8 years ago

Hey,

Is there any mechanism by which i can retrieve personalized user contents after a user logs in ?

Is there anyway, where the server will return an access_token on user login and then for subsequent rest calls, we can use this token ?

petersmithca commented 8 years ago

I may be misunderstanding, but the api access token is not a per user item. Not every user will have one, only those you set up as developers. The login method is intended to be used by an application so that any user can log in to that application, but still needs a developer access token.

Login returns the users id, and you use that for subsequent lookups.

The access_token is for the developer not on a per user basis, not all users would have one, only those who are developers. This token would be stored as a constant in what ever application you are developing.