Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
idogridish2
Creator II
Creator II

Error HTTP protocol error 403 (Forbidden): The server refused to fulfill the request.

hello,

I am trying to implement Email Alerts for failed tasks, 

using this article:

https://dataqlues.com/super-simple-app-to-send-email-notification-about-failed-reload-tasks-from-qli...

I am getting an error when trying to get the data from the rest connector ( monitor_apps_REST_task ) using
WITH CONNECTION (URL “https://localhost/qrs/task/full”)

the error is:

"HTTP protocol error 403 (Forbidden): The server refused to fulfill the request."

i am using a domain user that is running the services and is an administrator on the server,

when i run a test on the connector its successful:

2019-06-28_2243.png

any idea on why this is happening?

best regards,

Ido.

Labels (2)
8 Replies
Yoichi_Hirotake
Former Employee
Former Employee

It looks parameters in data connection is not set up properly.

When call QRS API, it requires both xrfkey and X-Qlik-XrfKey. 

Connection string of data connection for monitor_apps_REST_task is something like below:

CUSTOM CONNECT TO "provider=QvRestConnector.exe;url=https://localhost/qrs/task/full;timeout=999;method=GET;sendExpect100Continue=true;autoDetectResponseType=true;checkResponseTypeOnTestConnection=true;keyGenerationStrategy=0;authSchema=ntlm;skipServerCertificateValidation=true;useCertificate=No;certificateStoreLocation=LocalMachine;certificateStoreName=My;trustedLocations=qrs_proxy%2https://localhost:4244;queryParameters=xrfkey%20000000000000000;addMissingQueryParametersToFinalRequest=false;queryHeaders=X-Qlik-XrfKey%20000000000000000%1User-Agent%2Windows;PaginationType=None;allowResponseHeaders=false;allowHttpsOnly=false;"

If you have Qlik Sense Enterprise Server, you can import the original "Operations Monitor.qvf" into QMC from  C:\ProgramData\Qlik\Sense\Repository\DefaultApps. By doing this, the data connection of monitor_apps_REST_task will be also imported, so you don't need to type everything from scratch. 

rakeshshah
Partner - Creator
Partner - Creator

Hi

not sure if you ever resolved this - but I had the same issue... if you are using "WITH CONNECTION" to the QRS - you need to add the extra two lines for xrfkey and x-qlik-xrfkey ... see below 

 

WITH CONNECTION(
URL "https://localhost/qrs/app/object/full?filter=app.id eq e1630cf9-0aa5-44e7-a347-250c7d6de431",
QUERY "xrfkey" "0000000000000000",
HTTPHEADER "X-Qlik-XrfKey" "0000000000000000",
)
;

Frank_Hefner
Luminary Alumni
Luminary Alumni

Hi,
I have had the same problem but with the solution from @rakeshshah it works fine for my use-case 🙂
Thanks for sharing that solution!

BR,
Frank

Daniel_G
Partner - Creator
Partner - Creator

I have the same problem and adding those two  xrfkey and X-Qlik-XrfKey does not help. Any other suggestions?

I get follwowing exception (I changed the values for server, app Id and file):

The following error occurred:
HTTP protocol error 403 (Forbidden): The server refused to fulfill the request.
 
The error occurred here:
RestConnectorMasterTable: SQL SELECT ....  WITH CONNECTION ( URL "https://[SERVER_REPLACED]/api/v1/apps/[APP_ID_REPLACED]/data/metadata", HTTPHEADER "User-Agent" "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36" )

Connected
RestConnectorMasterTable << RestConnectorMasterTable Script Error = 12: File [FILE_REPLACED] has wrong format


I added newest app and app has those two parameters which was mentioned:
Olympionices_0-1621936686154.png

 

idogridish2
Creator II
Creator II
Author

Hi @rakeshshah ,

1. what app id should i use here?

URL "https://localhost/qrs/app/object/full?filter=app.id eq e1630cf9-0aa5-44e7-a347-250c7d6de431",

from my understanding i am going to the PostgreSQL database.

2. should the xrfkey and the X-Qlik-XrfKey be 0000000000000000 or i need to get those values from somewhere?

thanks!

Ido.

 

Daniel_G
Partner - Creator
Partner - Creator

I fixed it with following change:  

Setting "No anonymous user" in the virtual proxy Authentication settings in QMC:

  1. Open the Qlik Sense Management Console (QMC).
  2. Choose the Virtual Proxy which you use
  3. Click Edit.
  4. In the Properties menu (right side) choose Authentication
  5. From the Anonymous access mode drop-down select No anonymous user

 

Nika
Contributor
Contributor

Did you find a solution?

williejacobs
Creator
Creator

I had the same issue. I had removed admin rights from my service account.

Assigned admin rights and connector worked again without issues.