The CreatorCon Call for Content is officially open! Get started here.

Using Mockaroo with ServiceNow Error Please Help

Stefan Petkovic
Tera Contributor

Hey guys I'm having some issues fetching some random data from the Mockaroo API.
I'll try to be short and to the point, thanks for listening.

Here's what I did so far I created a Connection & Credential Aliases and added one Connection with the connection URL as : "https://my.api.mockaroo.com/vehicles.json".

After this I created an action in flow designer and added a REST step, selected the connection alias that I created before and bellow within the headers I added name as : X-API-KEY and value as my API number which is 7c00c190

After this I created a data source with the type REST, format JSON and the request action was the action I created in the flow designer.

After I click load all records I get this errorr : javax.json.stream.JsonParsingException: Unexpected char 109 at (line no=1, column no=12, offset=11) Can you help me ?

 

 

I did attach all the images below of how I have set-up my app.

PS: who wants can see the same post on reddit as well : 
https://www.reddit.com/r/servicenow/comments/16pynei/using_mockaroo_with_servicenow_error_please_hel...

 

5 REPLIES 5

tdexter
Tera Contributor

did you get this working? I have a similar issue: 

javax.json.stream.JsonParsingException: Invalid token=CURLYCLOSE at (line no=1, column no=12, offset=11). Expected tokens are: [CURLYOPEN, SQUAREOPEN, STRING, NUMBER, TRUE, FALSE, NULL]

It's definitely valid JSON and "test" in the REST action works fine and retrieves the data.