We try to integrate the Google Doc Ai https://cloud.google.com/document-ai/docs/drag-and-drop to send pdfs and receive parsed texts. I am struggling with the authentication in Apex for the Api call. I tried this example https://www.salesforceben.com/google-api-and-service-accounts-get-up-and-running-in-30-minutes/ But the bearer I get has no access_token. The flow where I call my Invocable action returns:
"An Apex error occurred: Auth.JWTBearerTokenExchange.JWTBearerTokenExchangeException: No access token in response: {...}".
It contains an id_token, but thats not what I need it seems. I don't know what I have to change. May be the Scope SCOPE = 'https://eu-documentai.googleapis.com/auth'; or audience_claim (AUDIENCE_CLAIM = 'https://www.googleapis.com/oauth2/v4/token') I use are wrong (I don't know where I get the exact information).
Or may be I need a different approach. Does somebody have an advise?