Page 1 of 1

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

Posted: Sat Dec 19, 2015 3:03 am
by umama fakher

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 !!


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

Posted: Sat Dec 19, 2015 10:47 am
by umama fakher

Thank you so much I got it .. Thanks.... :) !!


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

Posted: Sat Dec 19, 2015 10:58 am
by umama fakher

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.....


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

Posted: Sat Dec 19, 2015 11:00 am
by Evgene Karachevtsev

Hello Umama,

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


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

Posted: Sat Dec 19, 2015 11:04 am
by umama fakher

Hi Evgene
My Pleasure :)) ....