Ah, I have a CORS-friendly BigQuery-to-HTTP API thing (https://github.com/visnup/names/blob/master/index.js) that I run on Vercel using credentials tied directly to the BigQuery dataset. Do you have a similar connection?
Thank you for answering me. I have tried to build your code on my own vercel using my BQ service account (https://vercel-bigquery.vercel.app/). But it won't give me result. I have checked the BQ project logs, and queries are executed. Not sure what causing the error.