Hi,
I am trying to invoke the okta API by using the SDK where I am trying to get the client connection by using the OIDC API Services app but getting error nested exception is com.okta.sdk.impl.oauth2.OAuth2HttpException: invalid_client - The client_assertion signature is invalid.
Client client = Clients.builder()
.setOrgUrl(“https://{okta domain}”) // e.g. https://dev-123456.okta.com
.setAuthorizationMode(AuthorizationMode.PRIVATE_KEY)
.setClientId("{API Services App client ID}")
.setKid("{Private Key KID}") // key id (optional)
.setScopes(new HashSet<>(Arrays.asList(“okta.users.read”, “okta.groups.read”)))
.setPrivateKey("{Private key pem file path}").build();
Thanks,
Rajesh