I want call this api https://www.googleapis.com/admin/directory/v1/users.
I Have an application from Google Console with creditendials configured. API KEY.
I'am admin of my google gsuite domain.
I call
https://www.googleapis.com/admin/directory/v1/users?domain=xxx-xxx.com&key=xxxxxxxxxxxxxxxxxx
And I have this message
{
"error": {
"errors": [
{
"domain": "global",
"reason": "required",
"message": "Login Required",
"locationType": "header",
"location": "Authorization"
}
],
"code": 401,
"message": "Login Required"
}
}
I do not understand how it should work.