There are quite some possible reasons why you could be getting invalid_client. See a list of likely causes below:
- The clientid is not present in the connect/token call.
- The clientid is incorrect during the connect/token call.
- The clientid is mismatched between the connect/authorization, connect/token calls.
- The clientid is used when creating the client_assertion is incorrect/mismatched or not present.
- Invalid/wrong client_assertion used in the connect/token call can also return “Error: invalid_client”.
See screenshot below :
Steps To Resolve:
- Ensure client_id is present in the connect/token call.
- Ensure the client_id used when creating client_assertion and making connect/token calls is a valid client ID.
- Ensure client_assertion value is valid, and there are no white spaces.