As per SR notes, The root cause is configurations error, Rule form was not getting saved properly and authentication values were not taking from the downloaded certificate.
It got resolved by the following steps.
1. Try creating a new client and save the rule form. After saving the rule form click on view and download certificate.
2. After downloading the certificate, copy the credentials values for client_id, client_secret from the downloaded certificate.
3. After providing all the values and saving the rule form properly it worked fine and the user was able to generate the access token.