Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I'm calling the facebook API with tREST and when adding the time_range to the URL the job fails.
The call works fine when testing in postman but it seems that Talend has problem with the curly braces {}.
My URL is: "https://graph.facebook.com/v3.1/6063275471072/insights?fields=campaign_id,campaign_name,clicks,impre...time_range={since:'2018-08-21',until:'2018-08-21'}&access_token=***"
The Error is: Exception in component tREST_1
java.lang.IllegalArgumentException: Illegal character in query at index 124
I tried different brackets, context variables and backslash \{
but I can't make it work. Can anyone give me a hint ?
Make sure the cUrl is called like this:
search for tSystem and bash array or something to load it in the same bash environment ... below an example on how I do it:
new String[]{"bash","-c","curl -k -L -v -c "+((String)globalMap.get("cookiesFolder"))+"/cookie.txt https://somefreakingurl/login -d 'login=login&username="+context.Usr+"&password="+context.Pwd+"'" }