A couple of things I noticed, you are using HTTP. I thought the API only worked with HTTPS.
Also, you are invoking the bot without parameters. Is that right?
If you are struggling, a OpenAPI template for invoking a bot using the synchronous API is attached. You will need to change it to the name of your bot and add the appropriate parameters, but other than that the OpenAPI spec should work.
You can view the template using
Swagger Editor
------------------------------
NIGEL CROWTHER
------------------------------
Original Message:
Sent: Fri August 05, 2022 12:57 AM
From: JAMIL UDDIN SYED
Subject: Error in calling bots through API
I am using Postman API.
here is the syntax;
http://192.168.10.200:8099/scripts/test200
and this is the outcome;
<IntegrationErrorResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://automation.wdg.com/services/2016/07/01">
<ErrorMessage>Unable to cast object of type 'Org.BouncyCastle.Crypto.Parameters.RsaPrivateCrtKeyParameters' to type 'Org.BouncyCastle.Crypto.AsymmetricCipherKeyPair'.</ErrorMessage>
<Exception>System.InvalidCastException: Unable to cast object of type 'Org.BouncyCastle.Crypto.Parameters.RsaPrivateCrtKeyParameters' to type 'Org.BouncyCastle.Crypto.AsymmetricCipherKeyPair'. at WDG.Cryptography.RsaParametersFactory.CreatePrivateParametersFromPemFile(Byte[] , String ) at WDG.Automation.Cryptography.CredentialPasswordService.dcSbCEXw9N(CredentialModel , CredentialPrivateKeyConfigurationModel , Boolean ) at WDG.Automation.Cryptography.CredentialPasswordService.WDG.Automation.Cryptography.ICredentialPasswordService.Decrypt(CredentialModel , CredentialPrivateKeyConfigurationModel , Boolean ) at WDG.Automation.Service.Extensions.Wfkhts9dG6moOyl0KRi(Object , Object , Object , Boolean ) at WDG.Automation.Service.Extensions.UpdateWith(ServiceAgentParameters , ICredentialPasswordService , ExecutionResponseModel , TimeSpan ) at WDG.Automation.Service.ServiceAgent.DlDS3araeG8OfhlYPR.<Run>d__4.gwTQU7GQS2JKmGrpWah(Object , Object , Object , TimeSpan ) at WDG.Automation.Service.ServiceAgent.DlDS3araeG8OfhlYPR.<Run>d__4.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at WDG.Pipeline.DefaultPipelineMiddleware`1.<WDG-Pipeline-IAsyncMiddleware<TParameter>-Run>d__1.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at WDG.Pipeline.AsyncPipeline`1.<>c__DisplayClass10_0.I5NO1rxsUXb4YbxUIdW.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at WDG.Pipeline.DefaultPipelineMiddleware`1.<WDG-Pipeline-IAsyncMiddleware<TParameter>-Run>d__1.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at WDG.Pipeline.AsyncPipeline`1.<>c__DisplayClass10_0.I5NO1rxsUXb4YbxUIdW.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at WDG.Pipeline.AsyncPipeline`1.<ExecuteAsync>d__10.MoveNext()</Exception>
<NoAvailableLicenses>false</NoAvailableLicenses>
</IntegrationErrorResponse>
------------------------------
JAMIL UDDIN SYED
Original Message:
Sent: Thu August 04, 2022 01:06 PM
From: NIGEL CROWTHER
Subject: Error in calling bots through API
Hi Jamil,
What API are you using and what is the syntax of your REST call?
------------------------------
NIGEL CROWTHER
Original Message:
Sent: Wed August 03, 2022 08:51 AM
From: JAMIL UDDIN SYED
Subject: Error in calling bots through API
First I tried uploading new keys, but it didn't upload. Then I tried placing the old key in the same location but it didn't work.
Original Message:
Sent: 8/3/2022 8:12:00 AM
From: Giulianele Alves Barbosa
Subject: RE: Error in calling bots through API
Have you tried to add the private key on this new computer?
For all computers of a tenant, which has public and private keys configured, you need to add them on the folder you have configured on RPA control center for that tenant.
For example, I have the path C:\keys\privkey.pem so, for each new computer, I need to add the key files on this folder.
------------------------------
Giulianele Alves Barbosa
Original Message:
Sent: Wed August 03, 2022 07:53 AM
From: JAMIL UDDIN SYED
Subject: Error in calling bots through API
I am facing an error on calling every bot I try through API.
"Error trying to execute script. Unable to cast object of type 'Org.BouncyCastle.Crypto.Parameters.RsaPrivateCrtKeyParameters' to type 'Org.BouncyCastle.Crypto.AsymmetricCipherKeyPair'."
I have configured Vault on my RPA server, it was working well. Later on, I set up another computer and added it to the control center, after that, I am facing this error on calling the bot through API. I have then tried to upload new keys in the Tenant Credentials but could not do that.
Please help me out of this.

------------------------------
JAMIL UDDIN SYED
------------------------------