Generate JWT using Google Service Account

I have to use an API which is Google hosted micro-service.
For authentication, I have to generate a token(JWT) from Google Service Account.
I have Private key Id, Private Key, client email, client id, auth_uri, Token_uri.
Could you please help me how to get token with this details