I'm trying to get the customer domain by using the customers.get API. I already added the scopes in the consent screen:
- https://www.googleapis.com/auth/admin.directory.customer
- https://www.googleapis.com/auth/admin.directory.customer.readonly
But I get this error message after do the request (looks like a permission issue):
{
"error": {
"code": 403,
"message": "Requests to this API admin method ccc.hosted.frontend.directory.v1.DirectoryCustomers.Get are blocked.",
"errors": [
{
"message": "Requests to this API admin method ccc.hosted.frontend.directory.v1.DirectoryCustomers.Get are blocked.",
"domain": "global",
"reason": "forbidden"
}
],
"status": "PERMISSION_DENIED"
}
}
For some reason, in Google's API Explorer works perfectly but not in my API Client (Insomnia) nor my web app. In my web app I set the scopes using JavaScript Client library.
Also, I'm using Google Drive, Docs APIs and those work well.
Is there something I'm missing with this API?
Thanks.