Page 1 of 2
How can I get additional parameters returned in the Login service response?
Posted: Wed Nov 20, 2013 3:49 am
by Bryce
How can I get additional parameters returned (in addition to the "_id" and "sessionToken" parameters) in the 'login_service' ?
I added an additional parameter on the "Response" tab of the login_service, however this parameter is not returned in the json response. (see image attached).
I saw the same question asked by another user (https://getsatisfaction.com/apperyio/...) however the response was not satisfactory.
Please, can someone give me a very specific answer to this straight forward question.
Thanks in advance!
How can I get additional parameters returned in the Login service response?
Posted: Wed Nov 20, 2013 4:57 am
by Alena Prykhodko
Sorry for delay, as soon as I test it I'll update.
How can I get additional parameters returned in the Login service response?
Posted: Wed Nov 20, 2013 5:01 am
by Bryce
How can I get additional parameters returned in the Login service response?
Posted: Wed Nov 20, 2013 8:43 am
by Maryna Brodina
Hello! Response structure is defined by Rest Service and response parameters you set in editor should depend on server, not vice-versa. So if you add Response parameter, it won't affect result returned by Login service. If you need to retrieve users data from Users collection please take a look here http://docs.appery.io/documentation/b...
How can I get additional parameters returned in the Login service response?
Posted: Tue Jun 03, 2014 6:54 am
by Jamie Steiner6905824
Hi, I don't think this is a very useful way to do it. Below is a screen shot from the docs, and hardcoding the _id in the url as default is pretty useless unless I am missing something, or the app only has one user...
How can I get additional parameters returned in the Login service response?
Posted: Tue Jun 03, 2014 7:29 am
by Evgene Karachevtsev
Jamie,
You can get a list of all users: http://devcenter.appery.io/documentat...
How can I get additional parameters returned in the Login service response?
Posted: Tue Jun 03, 2014 8:08 am
by Jamie Steiner6905824
I tried that, but cant map any element of the response to a local variable. When I follow the example exactly, I get a list of all users.
How can I get additional parameters returned in the Login service response?
Posted: Tue Jun 03, 2014 8:45 am
by Evgene Karachevtsev
Hello Jamie,
Please clarify, how have you tried to do this? Please send us screenshots of your service, its response and mapping.
How can I get additional parameters returned in the Login service response?
Posted: Tue Jun 03, 2014 9:01 am
by Jamie Steiner6905824
I actually have a question open on it here:
https://getsatisfaction.com/apperyio/...
I was responding here, while researching, because the solution of building the user id into the url doesn't seem very good (which, by the way, the link you provided above again tell me to do). I think your platform needs a better way to access local variables, and use them in different contexts.
How can I get additional parameters returned in the Login service response?
Posted: Tue Jun 03, 2014 9:05 am
by Evgene Karachevtsev
Jamie,
Then let's continue conversation here https://getsatisfaction.com/apperyio/...