Skip to content Skip to sidebar Skip to footer

Postman Pre-request Script To Create Jwt For Google Service Account

I am trying to create a JWT to get an access token for a Google Service Account to use in a Postman Pre-Request script. But I keep getting this error in the Postman Console: Error

Solution 1:

I was able to solve this.

My private key had escaped white space characters in it (\n,\t)

I opened up google chrome dev tools and just saved it to a variable with template literals and console logged it out to get a properly formatted key.

Another option may just to do that in Postman as well.

After that, it worked.

Published Collection: https://documenter.getpostman.com/view/8140651/SWECYFyf?version=latest

Post a Comment for "Postman Pre-request Script To Create Jwt For Google Service Account"