The most likely reason for the exception is that something in your code stage is null. Without seeing the code itself, it is hard to know where the issue would be.
I would suggest executing the API call with a tool like Postman (
https://www.getpostman.com/) first to make sure the API call you are creating works properly. Then try running the code you have written in Visual Studio. It is likely that Visual Studio will point out the same error and will reveal which line or object is the issue. When the code works in Visual Studio, you should be able to move it over to your Blue Prism Code Stage.
Alternatively, depending on which version of Blue Prism you are using, you can use the Web API function to configure your REST API call (System > Objects > Web API Services). This would remove the need to use a code stage to execute API calls.
Cheers.
------------------------------
Charles Kovacs
Developer Consultant
Blue Prism
America/Chicago
------------------------------
Charlie Kovacs