Aeneas McBurney
Posts: 0
Joined: Mon Jun 16, 2014 7:49 am

Session Token to access User table

Hi,

Is there a admin session token that I can read the user table without a user being logged in? I need to create a "forgot login details" function and read the users email from the table to resend login details.

Thanks,
Aeneas

obullei
Posts: 0
Joined: Thu Jun 05, 2014 12:17 am

Session Token to access User table

Hello!

Please take a look here: http://devcenter.appery.io/tutorials/...
This tutorial should help you.

Aeneas McBurney
Posts: 0
Joined: Mon Jun 16, 2014 7:49 am

Session Token to access User table

Hi Arina, that topic is very useful however I wanted to approach it slightly different in that I want to check the registered email is in the users table and if it exists email them their details. How do I check an email exists in the user table without a session token? Can I use the master key?

Thanks,
Aeneas

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

Session Token to access User table

Hi Aeneas,

Yes, you can use master key.

Please follow these steps:

1 Open your getUser service.

2 Navigate to the "Response" tab.

3 Add "X-Appery-Master-Key" request parameter. http://prntscr.com/44qut5/direct

4 Now you can populate this request parameter and query users collection in accordance to your needs without sessionToken.

http://prntscr.com/44qvas/direct

Regards.

Jennifer Liu
Posts: 0
Joined: Mon Jul 28, 2014 2:09 pm

Session Token to access User table

Hi, where do you create the getUser service because my app needs to perform a similar function.

I tried create a rest service and called it getUser, but I am not sure what to put for the url in the getUser rest service setting.

Thanks,

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

Session Token to access User table

Hi Jennifer,

Here is brief plan:

1 Create "getUser" REST service. http://devcenter.appery.io/documentat...

2 Navigate to Settings tab and populate it like on screen shot:

pre

URL: https://api.appery.io/rest/1/db/users/{userId}

/pre

http://prntscr.com/3y5fkm/direct

3 Navigate Request Tab and set following parameters:

pre

userId
X-Appery-Database-Id = {database_id}
X-Appery-Session-Token

/pre

http://prntscr.com/3y5fws/direct

That's all.

Regards.

Return to “Issues”