Please add authentication and pulling sessionIDs/authTokens for multiple calls

Mar 18, 2015 at 1:05 AM

I successfully installed the JSONSource component and am trying to test pulling some JSON values, but am having trouble. How do I pull the sessionID and other values from the JSON response below.

Also, how do you handle a sessionID or authToken for making the initial login and then subsequent calls for the data after login? Some APIs I need to pull data from do not allow the username or password for actual data calls.

{"data":{"userID":"535a5d8800419df25e9e9dd4ec4be495","sessionID":"109d29c98f224b4c974e2e02b34dfa7c","versionInformation":{"currentAPI":"v4.0","buildNumber":"acc566a9f4990e96efa73bad45cdeebd6fcbdac6","apiVersions":{"v1.0":"\/website\/api\/v1.0\/","v2.0":"\/website\/api\/v2.0\/","v3.0":"\/website\/api\/v3.0\/","v4.0":"\/website\/api\/v4.0\/"},"lastUpdated":"2015\/03\/13 17:04:09","release":"R16","version":"4.0"},"locale":"en_US","timeZone":"US\/Eastern","timeZoneName":"Eastern Standard Time","iso3Country":"USA","iso3Language":"eng","currency":{"useNegativeSign":false,"fractionDigits":2,"symbol":"$","ID":"USD","groupingSeparator":",","decimalSeparator":"."}}}
Mar 18, 2015 at 10:08 AM
Hi jmacweb,

One of the limits of this early version of the library is that data can be retrived in blocks at a single level of depth. This means that you can retrive multiple rows if their mapped json object belongs to the same parent node. Moreover the library expects to parse data from an Array of objects.
In your case, there's no array of objects. This is your main problem.

Future release will probably be able to manage single elements responses, but for now it's un unsupported feature.

About the Authentication matter, most web services require a token to be passed as temporary auth-key. This token may be obtained by calling a web service with auth data and retriving back the tocken to use in future. To do so, I would first use a "webservice task component" which manages authentication and retrives the auth token, then I'll pass this token as simple GET parameter to the URL of the services requiring authentication.
Marked as answer by webking on 3/18/2015 at 3:08 AM
Mar 18, 2015 at 10:28 AM
Edited Mar 19, 2015 at 8:18 PM
That sounds great. Please let me know when it is ready!

Also, some APIs do not work well with the web service, and also they require POST, not GET.
Aug 5, 2015 at 8:35 PM
Hi jmacweb,

good news. In the next release of the object (planned by the end of this month), there will be support for the POST web call and the component will be able to parse objects directly (so, even if don't have an array of objects it will work).
I'm not sure about it, but I might add support for OAuth and/or COOKIE persistence.

Stay tuned!
Aug 5, 2015 at 9:11 PM

Awesome keep me posted!

Aug 10, 2015 at 10:26 AM

I'm working on this, but I need some help. You started the thread referring to AuthToken and Session IDs. Well, can you give me an example of webservice that I can interrogate and see how to handle the problem?

Aug 10, 2015 at 1:56 PM

Mar 1, 2016 at 10:20 PM
Good news!

New beta relase is available for manual installation. I've written a step by step guide on how to install the component. Give it a try!
Marked as answer by webking on 3/1/2016 at 3:20 PM