cancel
Showing results for 
Search instead for 
Did you mean: 

Blue Prism 6.10 Utility HTTP request

dhavaljp
Level 4
Hi,

I was using 6.2 version and in that I use Utility HTTP request to call API. I use below configuration and it is working fine.
23512.png
I migrated to 6.10 in that above configuration not give me result. I see blank collection from API.

I build this for companies house API.

------------------------------
Dhaval Panchal
Senior Data Researcher II
S&P Global
------------------------------
29 REPLIES 29

Hi Eric,

I downloaded updated VBO from this link. https://digitalexchange.blueprism.com/dx/entry/3439/solution/utility---http 
By using this new vbo I face same issue. First time I received output after that don't receive require output. 
I don't understand what should be given as username and password with force pre authorization. I try with system username and password but its fail.
Can it be work like 6.2 version where no username password require. 
When i use normal header i got error as " m_certificate variable is not declared and  it is inaccessible due to its protection level" so i commented those lines in code but then it gives me error that "Proxy authentication required"

------------------------------
Dhaval Panchal
Senior Data Researcher II
S&P Global
------------------------------

I use API key which I got from companies house website. this is my header looks like.
23173.png with same details it work in 6.2. while in 6.10 it work only first time and then don't work.

------------------------------
Dhaval Panchal
Senior Data Researcher II
S&P Global
------------------------------

The screenshot below is from the Companies House site describing API authentication. You can find the page here.

23175.jpg
According to that page they use the HTTP Basic scheme with your API key being passed in as the username value. They ignore the password. So, try setting Force Pre Authorization to True and set Username to the value of your API key. You should be able to leave Password blank.

Cheers,



------------------------------
Eric Wilson
Director, Integrations and Enablement
Blue Prism Digital Exchange
------------------------------

Hi Eric,

I already tried with option you suggested.

23177.png
Even I try with header as well. but getting below error.

<HTML><HEAD>
<TITLE>Access Denied</TITLE>
</HEAD>
<BODY>
<FONT face="Helvetica">
<big><strong></strong></big><BR>
</FONT>
<blockquote>
<TABLE border=0 cellPadding=1 width="80%">
<TR><TD>
<FONT face="Helvetica">
<big>Access Denied (authentication_failed)</big>
<BR>
<BR>
</FONT>
</TD></TR>
<TR><TD>
<FONT face="Helvetica">
<h2>Sorry, your access has been denied</h2>We're sorry, your access to the Intranet has been denied because the username and password you entered does not match our records. Please try these suggestions for entering the correct username and password:<br/><br/><h3>Did you enter the right username?</h3>Your user name should be all lower-case letters (with no spaces between the first and last name), for example, john_brown.<h3>Still not working? <a href=http://simpleaccess20.mhf.mhc/xlWebApp/forgetPassword.do?method=displayVerifyUserId target=_top>Click here</a> to reset your password by the "Forgotten Password" link. You will be required to have your answers to the previously selected secret questions.</h3>
</FONT>
</TD></TR>
<TR><TD>
<FONT face="Helvetica">

</FONT>
</TD></TR>
<TR><TD>
<FONT face="Helvetica">
<BR>
For assistance, please contact <BR><BR>S&P Global Service Desk # contact no., or find the full global list on theHub <BR><BR>As an alternative to calling Service Desk, you can submit your service request easily on our eHelp site at <a href=http://ehelp.mhf.mhc>http://ehelp.mhf.mhc</a> or send an email to.   ################ 
</FONT>
</TD></TR>
</TABLE>
</blockquote>
</FONT>
</BODY></HTML>





------------------------------
Dhaval Panchal
Senior Data Researcher II
S&P Global
------------------------------

@dhavaljp,

You mentioned Companies House. Are you aware there's an existing integration for Companies House on the DX. Have you tried that connector?​

I just performed a Search Companies call against the Companies House API, using my API key and the latest HTTP VBO, and I received results just fine.

23180.png
23181.png

23182.png
The response you show above seems to imply that you're working through a proxy server. Is that the case? If so, you would typically need to set the Use Proxy flag and the Proxy URI, Proxy Username, and Proxy Password values too.

Cheers,

------------------------------
Eric Wilson
Director, Integrations and Enablement
Blue Prism Digital Exchange
------------------------------

Thanks Eric for your time to resolve this issue.

I build bot to fetch PDF files from companies house, its not available in current digital exchange API. Even I check with that API, I got below error.

Internal : Unexpected error Error during Web API HTTP Request
HTTP Status Code: 400
HTTP Response Content: {"error":"Invalid Authorization header","type":"ch:service"}


I downgraded my BP version to 6.2 and run the bot it working fine on same machine where I am facing issue in 6.10. Is there any setting require for web api in BP? 

Kindly recheck your Utility HTTP request code that looks main issue.

------------------------------
Dhaval Panchal
Senior Data Researcher II
S&P Global
------------------------------

@dhavaljp,

If you're saying your HTTP VBO from v6.2 does exactly what you need, why don't you import that VBO into your v6.10 environment and use it?

To investigate the v6.10 VBO further I'll need more information regarding what specific endpoints on the Companies House API you're trying to invoke, so I can build a test process that replicates exactly what you're doing (or as close to it as possible). You mention you're downloading PDF's, can I assume that you means you're trying to use the Companies House Document API? If so, can you send me the specific document_id that you're trying to download? 

Cheers,


------------------------------
Eric Wilson
Director, Integrations and Enablement
Blue Prism Digital Exchange
------------------------------

@dhavaljp,

I added a few steps to my current test including fetching a PDF of an AD02 filing by Blue Prism. It worked fine for me.

23223.png
NOTE: To download a binary file like a PDF you should use the HTTP Request File action, instead of the HTTP Request action. This will capture the binary stream and actually write it to a file on your local drive.

23224.png

Cheers,


------------------------------
Eric Wilson
Director, Integrations and Enablement
Blue Prism Digital Exchange
------------------------------

I import 6.2 VBO in 6.10, in that case I received this error. "Could not execute code stage because exception thrown by code stage: The remote server returned an error: (407) Proxy Authentication Required."
Are you provide only API key as username or anything else needs to be provide with it?
Like: api keys is: 9bf911c4-91e6-43cd-a463-06####### then provide only API key?
I use below code to fetch document.

23234.png

------------------------------
Dhaval Panchal
Senior Data Researcher II
S&P Global
------------------------------

@dhavaljp,

If you recall earlier in our thread you had received a 407 HTTP response page, and I asked if you were working through a web proxy on your company network. This seems to show that you are indeed working through a proxy server. When you open a normal browser window and browse to a web site (ex. this Community site) are you prompted to enter credentials first? Most likely, your proxy server requires your network credentials (typically the same credentials you use when you log into your machine).

The VBO exposes four parameters that should be set if you are traversing a proxy server: Use Proxy, Proxy URL, Proxy Username, and Proxy Password

23245.png
​Cheers,

------------------------------
Eric Wilson
Director, Integrations and Enablement
Blue Prism Digital Exchange
------------------------------