DEV Community

Cover image for authentication as google service account.
Alejandro Avellaneda
Alejandro Avellaneda

Posted on

authentication as google service account.

Good afternoon people, a consultation. I am trying to log in with php and a google service account (example from the api here https://cloud.google.com/document-ai/docs/form-parser)

I do not know how to generate the access token from the library that google provides for php I cheated and generated it from the console, and passed it as plain text in the header of the request with curl

Alt Text
*token generated with trap, at this value I must generate it with the google library for php

(example of how to authenticate as a service account according to goolge https://cloud.google.com/docs/authentication/production)

Discussion (0)