I spent a whole week struggling with the Gmail API, but without success.
My task:
- create a mailbox with a custom domain;
- connect to this mailbox via Gmail API using service account.
What I did:
-
Created an account in Google Workspace (14 days free of charge) and verified the domain by receiving a work mailbox with a custom domain:
-
Gave the account the rights of the owner:
-
Created a project within the organization:
-
Created a service account in the project:
-
Added a key:
-
Added Gmail API to the project:
-
In Google Workspace, I added delegation of access to data in the domain:
-
Created a JWT token in a Wappler with full access to gmail:
-
Created OAuth2 provider:
-
Created an API action with a request for a list of messages:
However, I always get an error:
I note that I can easily recreate this manual without any errors:
Also, I have already read all the guides from google a hundred times and done everything that was indicated in them.
@Teodor, @psweb, @patrick what could I have missed?
I would be very grateful for any help to the community.