2. When you read in the private key in your NodeJS server application, remember check it’s not amended in any way. If you look at the private key string that’s included in the service account json provided by Google Cloud Console’s IAM manager, it has got a multitude of \n every here and there. Those are converted into \\n‘s when the private key is accessed from the environment variable and they have to be put back in order. So basically do something like this: