Hello everyone,
I am setting up an OAuth authentication flow in Make to allow my clients to connect their email accounts to my Make space without requiring direct access. The process should work as follows:
1. A client triggers a webhook
This initiates the scenario.
2. Creating a connection in Make
- A POST request is sent to Make’s API to create an OAuth connection.Request:
POST https://eu2.make.com/api/v2/connections?teamId=XXXX
3.Headers:*
Content-Type: application/json
Authorization: Token XXXXX-XXXXX-XXXX-XXXX-XXXXXXXXX
4.Body:*
{
"accountName": "Google Test",
"accountType": "google-restricted"
}
Result: The connection is successfully created in Make.
- Generating the Google authentication link
- A second API call is made to generate the authentication link.Request:
POST https://eu2.make.com/api/v2/oauth/auth/{{7.data.connection.id}}
6.Headers:*
Content-Type: application/json
Authorization: Token XXXXX-XXXXX-XXXX-XXXX-XXXXXXXXX
7.Query Parameters:*
TeamId: XXXXXX
scope: https://mail.google.com
connectionID: [ID from the previous step]
Result: The authentication link is successfully generated.
- Redirecting the user to the authentication page
- The authentication link is returned to the client via a Webhook Response module with a 302 Redirect.
Result: The client is redirected to the Google authentication page.
Issue Encountered
When the user completes the authentication, the following error appears:
{
"detail": "Access denied.",
"message": "User is not logged in.",
"code": "IM015",
"suberrors": []
}
I would appreciate any insights or solutions from those who have experience setting up OAuth authentication in Make, I have tried everything
Thanks in advance!