I am trying to retrieve and save the username when the user logs in but all the response has is the _id and sessionToken. How do I receive the username as well.
I am trying to retrieve and save the username when the user logs in but all the response has is the _id and sessionToken. How do I receive the username as well.
Hi Brian.
Please follow these steps to get user details:
1 Open login service mapping and make following response mapping:
http://prntscr.com/3y5i8o/direct
2 Create "getUser" REST service. http://devcenter.appery.io/documentat...
See details on screenshots:
URL: https://api.appery.io/rest/1/db/users...
http://prntscr.com/3y5fkm/direct
Request Tab parameters:
userId
X-Appery-Database-Id = {database_id}
X-Appery-Session-Token
http://prntscr.com/3y5fws/direct
3 Add "getUser" datasource to the page and create following mapping:
http://prntscr.com/3y5jj4/direct
4 Open "Events" buttom panel in page "data" mode and add "login" success event handler - invoke getUser service.
http://prntscr.com/3y5lro/direct
That's all
Regards.
I at least feel better because I was already doing everything you had listed....unfortunately my problem still exists.
I think the problem stems from the fact that my "getUser" service won't even run when I try the test. I get the error:
Code: Select all
"status":"401 Unauthorized",
"url":"[url=https://api.appery.io/rest/1/db/users/53b1a31be4b07420882b4720]https://api.appery.io/rest/1/db/users...[/url]",
"response":{
"code":"DBUG001",
"description":"unauthorized" If I query any of the other collections it works fine, but it doesn't like it when I try to do it against the "users" table.
Hi Brian.
Now we need to see your implementation.
Thus, give us your app public link please.
Regards.
where do I get that from?
What this issue resolved? I am getting similar issues like the original poster and I've tried all that I could. I think this was working sometime ago for me, but now I get the error message like stated above.
Hello,
Let's continue here https://getsatisfaction.com/apperyio/.... Please stay tuned, we will reply as soon as possible.
Sure, I'm biting my nails here as I'm running out of time.