Cannot populate from sample response: get error: must be valid JSON response.
Posted: Wed May 16, 2012 2:49 am
by jimamster
I am receiving a response to a token request as shown below.
access_token=token_value
I am not able to use the “populate from sample response” due to the “=” sign.
When I try to "populate from sample response" on the service test screen, I get the "Must be valid JSON response" error.
I cannot parse out the token and store it. Any ideas?
Cannot populate from sample response: get error: must be valid JSON response.
Posted: Wed May 16, 2012 3:02 am
by maxkatz
Can you share the service or the JSON you are trying to use?
Cannot populate from sample response: get error: must be valid JSON response.
Posted: Sat May 19, 2012 3:31 pm
by jimamster
Got this to work. Thanks for the help. I added a complete event with a custom javascript action shown below.
var access_token = jqXHR.responseText.split("=")[1];
localStorage.setItem('access_token', access_token);
This is a slight variation the script described at the following link.
http://help.gotiggr.com/documentation...