Hi thc202.
I tried to setup the code in eclipse but I get the following error:
Exception in thread "main" org.zaproxy.clientapi.core.ClientApiException: Invalid or missing API key (bad_api_key)
at org.zaproxy.clientapi.core.ApiResponseFactory.getResponse(Unknown Source)
at org.zaproxy.clientapi.core.ClientApi.callApi(Unknown Source)
at org.zaproxy.clientapi.gen.Authentication.setAuthenticationMethod(Unknown Source)
at AuthenticationApiExample.setFormBasedAuthenticationForBodgeit(AuthenticationApiExample.java:123)
This is causing the error - authApi.setAuthenticationMethod(null, contextId, "formBasedAuthentication", formBasedConfig.toString());
I checked the API which indicates this function only takes 3 parameters and not 4-
setAuthenticationMethod(String contextid, String authmethodname, String authmethodconfigparams) -
As you can see above, the code that's throwing my error is taking 4 parameters, not 3. And where can I give the code with my API key? I'm probably missing something obvious!
Thanks & Regards.