Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear Qlik Experts,
I'm setting up an OAuth2 API connection in Qlik with Exact Online. I've managed to extract a refresh and access token, however when I try to access the end point with a GET call I get the following error:
(Connector error: Unexpected character encountered while parsing value: <. Path '', line 0, position 0.)
I've tried everything to fix it, but I can't seem to find a solution. I've used the following guides to get to this point:
https://community.qlik.com/t5/Connectivity-Data-Prep/QLIK-REST-Connector-and-OAuth2/td-p/1846711
Code:
LIB CONNECT TO 'REST_GET';
MasterTable:
SQL SELECT
"Code"
FROM JSON (wrap on) "root"
WITH CONNECTION (
URL "$(vURL)",
HTTPHEADER "Authorization" "Bearer $(vAccessToken)",
BODY "$(vRequestBody)"
);
To be more specific, I've tried to retrieve administration codes from Exact Online, using the following exact code:
LIB CONNECT TO 'REST_GET';
set vContentType = 'application/x-www-form-urlencoded';
set vURL = 'https://start.exactonline.nl/docs/XMLDivisions.aspx';
set vRequestBody = '';
MasterTable:
SQL SELECT
"Code"
FROM JSON (wrap on) "root"
WITH CONNECTION (
URL "$(vURL)",
HTTPHEADER "Authorization" "Bearer $(vAccessToken)",
BODY "$(vRequestBody)"
);