Google Chat connection issues

According to the module settings, to connect Google Chat, I have to enter user email and private key.
But when I enter them, I always get an error when I try to connect:

Failed to verify connection ‘My Google Chat connection’. Function ‘jwt’ finished with error! error:0909006C:PEM routines:get_name:no start line

** Failed to verify connection ‘My Google Chat connection’. Function ‘jwt’ finished with error! error:0909006C:PEM routines:get_name:no start line*

The key is in a strange format with —BEGIN KEY---- at the beginning and ----END KEY---- at the end and line separators \n in many places. If I remove all this, still nothing changes.

Can you please tell me, who has faced this problem, how to set up a connection correctly?