cancel
Showing results for 
Search instead for 
Did you mean: 

ping federate url not working in BP webservice but working in http object

Vijay.A
Level 4

Key details :

method: Post

Header =Authentication type: Basic  <username;password> base64

url (generic) = https://env.federate.domain.com/as.token.oauth2?grant_type = client credentials.

 

How do we use these details to create web service api request in Blue prism ? @BluePrism 

1 BEST ANSWER

Helpful Answers

@saha1sourav2 

excellent, thanks for your support

View answer in original post

9 REPLIES 9

saha1sourav2
Level 5

Hi @Vijay.A,

Please follow the steps below to create a web service request in Blue Prism-

  1. Go to System > Web API Services. Click Add Service → Enter a Name like My Web Service

  2. Set the Base URL as: https://env.federate.domain.com     saha1sourav2_0-1750163638686.png
  3. Under the service, click Add Action. Set: Name as GetOAuthToken, Request URL Path as /as.token.oauth2?grant_type=client_credentials and Request Method: POST

    saha1sourav2_2-1750164019103.pngsaha1sourav2_3-1750164093954.png

     

  4. Go to the Headers tab in the action:

    Add the following - Authorization as Basic <Base64(username:password)>
    Content-Type as application/x-www-form-urlencoded

    saha1sourav2_4-1750164297965.png

     

  5. You are done with the Web Services configuration, click OK. Now to call the configured Web API action in Blue Prism, use an Action stage in Process or Object Studio, select your Web API service (e.g., OAuth2 Token Service) and the action (e.g., My Web Service). Map any required inputs if needed, and capture the Response Content into a data item (e.g., GetOAuthToken). Then, use the Utility - JSON VBO's Get Value From JSON action with the JSON path $.access_token to extract the required values from the response.

Please go through the following Blue Prism documentation portal for more insights - https://docs.blueprism.com/en-US/bundle/blue-prism-enterprise-6-7/page/helpWebServices.htm

If you find this reply helpful, please mark this as Best Answer.

 

Best regards,
Sourav S
Consultant
WonderBotz

@saha1sourav2 

excellent, thanks for your support

Best Answer.

Hello Sourav,

Another issue facing while passing a body connect form type. Request to help fixing this body content issue

 

VijayA_0-1750416803975.png

VijayA_1-1750416867501.pngVijayA_2-1750416888810.png

VijayA_3-1750416924361.png

VijayA_4-1750416972824.png

VijayA_5-1750417073703.png

 

 

 

 

 

saha1sourav2
Level 5

Hi @Vijay.A,

  1. Try using the parameter as "lifecycle__v" or "lifecycle_v".
  2. Ensure that the Content-Type header is set to "application/json".
  3. Instead of passing the [JSON Template] variable directly in the body, try constructing the JSON payload within the body itself using parameter placeholders as shown below-saha1sourav2_0-1750658268786.png

 

If it still doesn’t work, feel free to let me know — I’ll be happy to guide you further.

 

Best regards,
Sourav S
Consultant
WonderBotz

VijayA_0-1750659404209.png

getting same error again 

Would need your help in constructing the body content in JSON form to use in Blue prism as body template. Pease refer to the below CURL from postman code snippet.

CURL code snipper from Postman:

--form 'file=@"HLs4fvewG/New_test_doc.txt"' \

--form 'name__v="TestDoc05022025"' \

--form 'type__v="Regulatory"' \

--form 'subtype__v="Clinical Trial Information"' \

--form 'classification__v="Lay Summary"' \

--form 'lifecycle__v="General Lifecycle"' \

--form 'product__v="00P000000008011"'

saha1sourav2
Level 5

Hi @Vijay.A,

You need to ensure the API endpoint supports application/json requests. However, file uploads typically use multipart/form-data, not JSON. If your API supports Base64 file uploads via JSON, here's how you can convert it:

1. Convert the file to Base64
Read the file New_test_doc.txt, and convert its content to a Base64 string (use a base64 encoder or Blue Prism utility).

Let’s assume the file content is converted to this dummy Base64: SGVsbG8gV29ybGQhIFRoaXMgaXMgYSB0ZXN0IGZpbGUu

2: Construct the JSON body like below:
{
"file": {
"name": "New_test_doc.txt",
"content": "SGVsbG8gV29ybGQhIFRoaXMgaXMgYSB0ZXN0IGZpbGUu",
"encoding": "base64"
},
"name__v": "TestDoc05022025",
"type__v": "Regulatory",
"subtype__v": "Clinical Trial Information",
"classification__v": "Lay Summary",
"lifecycle__v": "General Lifecycle",
"product__v": "00P000000008011"
}

This approach only works if the API accepts Base64 file uploads in JSON. Check the API documentation.

 

Best regards,
Sourav S
Consultant
WonderBotz

Still getting the same error!!! Can you please guide me here on how to use Http request using multi part form

VijayA_0-1751284808320.png