I am trying to create a new REST API resource to request the https://sheets.googleapis.com API. I want to authenticate with a new Service Account I just created.
I copied and pasted the Service Account key payload
When running a simple request, I get the following error:
{
"error": {
"code": 401,
"message": "Request had invalid authentication credentials. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project.",
"status": "UNAUTHENTICATED"
}
}
which makes me think that something is missing maybe in the headers? However, I cannot find helpful documentation about using Service Account in REST API resources.
I found this:
If you select
Service Account
, you need to provide a Service account key .
And here there is nothing about Service Account.
Any idea where to look to make it work?