umama fakher
Posts: 0
Joined: Fri May 22, 2015 4:26 pm

Predefined User Collections .. How to get currently signed in username and other fields to save it to Local Storage

Can anyone help me in figuring out how to get the username and additional fields from predefined User collection (Any Javascript) ?

I want to get currently signed in user details and want to display and save it to corresponding data on another page ... Please help it's urgent! Thanks in advance !!

umama fakher
Posts: 0
Joined: Fri May 22, 2015 4:26 pm

Predefined User Collections .. How to get currently signed in username and other fields to save it to Local Storage

In order to have data from predefined User Collection ...

Create a Rest Service named User or as you wish, in the URL have this https://api.appery.io/rest/1/db/users

and then in request in header add a new parameter .. X-Appery-Session-Token as name and then from developer console you can see the session token stored copy and paste it in the value and then go to test and then the service.

As soon as you test you'll get all the data from the user collection then hit import as response all the fields will be imported in response.

Now you can delete the session token value from header parameter.

You can see you are having all the users from your collection to specifically have the certain user use query where service and run the javascript to search the specific value and then store it to local storage via mapping success event of USer service. I know it is not step by step but I hope it will be a good clue and from here it will be easy to follow for those who are working on it.... Thanks...

If there is any question I can answer it & Good luck to everyone here.....

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

Predefined User Collections .. How to get currently signed in username and other fields to save it to Local Storage

Hello Umama,

Thank you for the update, sure this information will be useful for other users.

Return to “Issues”