10-31-2019 11:25 AM
I want to be able to set the User State in a 3rd party Gadget. I have the following code form a sample gadget provided on the cisco site
setUserState : function (state) {
clientLogs.log("setUserState(): The user's current state is: " + state);
if (state === 'READY') {
alert('Before Set ready');
user.setState(states.READY);
alert('After Set ready');
} else if (state === 'NOT_READY') {
alert('Before Set not_ready');
user.setState(states.NOT_READY);
alert('after Set not_ready');
}
},
User.setstate(state.Ready) works fine but
User.SetState(state.NOT_READY) fails with a 400 (bad Request)
Solved! Go to Solution.
10-31-2019 02:01 PM
Hi,
Did you look at the response body of the 400? Is it something like this?
You need to use the setState that takes in a ReasonCode object.
I am also making the assumption that the capital U for your User.setState is a typo.
Thanx,
Denise
10-31-2019 11:50 AM - edited 10-31-2019 12:08 PM
10-31-2019 02:01 PM
Hi,
Did you look at the response body of the 400? Is it something like this?
You need to use the setState that takes in a ReasonCode object.
I am also making the assumption that the capital U for your User.setState is a typo.
Thanx,
Denise
11-01-2019 04:41 AM
Thanks to all for the assistance.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide