Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 pgsimon3
		
			pgsimon3
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Dear Qlik-Community,
I'm trying to connect to SAP Business One by Service Layer, which provides an REST API.
A Login is required first and provides a cookie, that needs to be sent within the header of every following GET request.
The login works fine with an REST Connector POST query and retrieves the required cookie.
Testing my expressions in POSTMAN, everything works fine and the cookie is automatically handled by POSTMAN.
Trying to insert the cookie as a query header for a GET request to retrieve data results in an error:
Connection failed: HTTP protocol error 401 (Unauthorized):
Requested resource requires authentication
If I'm trying to use any of the provided authentication methods of the REST Connector, the same error arrives, probably because a POST request is needed for the login.
I also tried the method described in another forum post: REST CONNECTOR locate the Authorization token
Where the a variable is set as the cookie value and then included via WITH CONNECTION, but this results in the same error
Can anyone share any insights how Qlik and/or SAP B1 handle the headers and cookies?
Best regards and thanks in advance
Simon
 pgsimon3
		
			pgsimon3
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		To keep this thread updated:
The problem was an error in the SAP documentation. The authorization cookie has to be sent including the HASH values, which is not documented in SAP.
Best regard
Simon
 
					
				
		
 Levi_Turner
		
			Levi_Turner
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		It'll very much depend on the REST endpoint, but this doc may be helpful: Handling Refresh Tokens with the Qlik REST Connector
 pgsimon3
		
			pgsimon3
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Thanks for the suggestion.
Unfortunately that results in the same "Unauthorized" error. It seems to me that Qlik handles the httpheader somehow different done postman and SAP B1 therefore does not accept the authorization cookie.
Any ideas how Qlik handles the header?
 pgsimon3
		
			pgsimon3
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		To keep this thread updated:
The problem was an error in the SAP documentation. The authorization cookie has to be sent including the HASH values, which is not documented in SAP.
Best regard
Simon
