Hi, Steven,
you are lucky guy ;) as I just solved it after 3 almost full days of investigation this morning.
My understanding is following:
1. you need to have G Suite account activated (if you don't have it you can activate it for 14 days for free). So to state it clearly - this will not work for personal gmail account - as long as you are going to use service account.
2. if first step done you need to perform all the steps which are found here
https://developers.google.com/admin-sdk/directory/v1/guides/delegation3. when you import bpskill you need to follow the guide for configuration
4. when all configurations are done you need to change properties of the Common Authentication parameters in Authorization URI and Audience like in the image below. The scope and subject depends on your environment and requirement.
4. after that it should work, at least it worked for me
------------------------------
Zdeněk Kabátek
Head of Professional Services
NEOOPS
http://www.neoops.com/Europe/Prague
------------------------------
Original Message:
Sent: 08-27-2020 18:55
From: Steven Cheng
Subject: Precondition check failed error using Gmail API v1
Does anyone get it to work? I get the following error to use gmail.users.messages.list or gmail.users.messages.read.
Internal : Unexpected error Error during Web API HTTP Request
HTTP Status Code: 400
HTTP Response Content: {
"error": {
"code": 400,
"message": "Precondition check failed.",
"errors": [
{
"message": "Precondition check failed.",
"domain": "global",
"reason": "failedPrecondition"
}
],
"status": "FAILED_PRECONDITION"
}
}
------------------------------
Steven Cheng
IT Application Advisor
Celestica Inc.
America/Toronto
------------------------------