0
votes

I am trying to make test request from
big-query docs

It works correctly when I use oauth2, but if I use api-key response is "code": 401, "message": "Request is missing required authentication credential. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project.".

Any ideas?

1
Hello and welcome to Stackoverflow. Please read through How to Ask so it becomes easier to help you. What code are you using? How are you doing the oauth steps? The more information you share the more likely you are to get a solution to your problem.Willian Fuks
Hi! Thanks! I send request directly from big query doc page (from "Try this API" panel), for sending this request it is need only to fill project id, dataset and table name fields on the page - there is no code at allsm2

1 Answers

0
votes

I'm not entirely sure why Google have added that option to the API explorer in BigQuery. My best guess it that it allows you to inspect the network request to the API, and then add your own API key for testing.

That said however, API keys won't work with BigQuery anyway. You need to use a service account instead.

https://support.google.com/cloud/answer/6158857?hl=en

Use an API key when your application is running on a server and accessing one of the following kinds of data:

Data that the data owner has identified as public, such as a public calendar or blog. Data that is owned by a Google service such as Google Maps or Google Translate. (Access limitations might apply.)