a month ago
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
Answered! Go to Answer.
a month ago
a month ago
Hi @Vijay.A,
Please follow the steps below to create a web service request in Blue Prism-
Go to System > Web API Services. Click Add Service → Enter a Name like My Web Service
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
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
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.
a month ago
a month ago
Best Answer.
4 weeks ago
Hello Sourav,
Another issue facing while passing a body connect form type. Request to help fixing this body content issue
3 weeks ago
Hi @Vijay.A,
If it still doesn’t work, feel free to let me know — I’ll be happy to guide you further.
3 weeks ago
getting same error again
2 weeks ago
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"'
2 weeks ago
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.
2 weeks ago
Still getting the same error!!! Can you please guide me here on how to use Http request using multi part form