We are getting SSL handshaking error while calling the OAuth API from our backend code even with the server-to-server approach. Also, we have performed the following steps on basis of our earlier discussions.
Initially, implemented Oauth API instead of using the JWT token
Later implemented the OAuth Server-to-server approach
Then we set the SSL protocol to TLSv1.2 as suggested on Stack Overflow documentation*