“Could not refresh access token” error when using Google API

I am trying to use the Google vision api and I keep getting this error whenever I ran the program. enter image description here

This is being done in javascript, I have made a service account, keys and have enabled the api, it also has owner roles to access the api. Not sure where I’m going wrong as I did follow the documentations.