Hello everyone,
I am developing a custom module for the Gmail API in Make, and I am facing an issue with OAuth2 token storage. I followed the official documentation, and the process seems to work correctly:
• Initial authentication works – I can retrieve the accessToken and refreshToken manually via Postman.
• OAuth authorization is successful– The Google sign-in window opens, and I can select my Gmail account.
• Tokens are received in the response – access_token, refresh_token, and expires_in are present.
• Make does not seem to store the access token– When I try to call the Gmail API after authentication, I get a 401 Unauthorized error.
What I Have Tested and Observed
-
Postman Test – If I manually insert my accessToken, the request works.
-
Logging {{connection.accessToken}} – It appears empty when calling the Gmail API.
-
Refresh Token Handling – It does not seem to be executed automatically in Make.
{
“authorize”: {
“url”: “Sign in - Google Accounts”,
“qs”: {
“scope”: “{{join(oauth.scope, ’ ')}}”,
“client_id”: “{{ifempty(parameters.clientId, common.clientId)}}”,
“redirect_uri”: “{{oauth.localRedirectUri}}”,
“response_type”: “code”,
“access_type”: “offline”,
“prompt”: “consent”
},
“response”: {
“temp”: {
“code”: “{{query.code}}”
}
}
},
“token”: {
“condition”: “{{temp.code}}”,
“url”: “https://oauth2.googleapis.com/token”,
“method”: “POST”,
“body”: {
“code”: “{{temp.code}}”,
“client_id”: “{{ifempty(parameters.clientId, common.clientId)}}”,
“client_secret”: “{{ifempty(parameters.clientSecret, common.clientSecret)}}”,
“grant_type”: “authorization_code”,
“redirect_uri”: “{{oauth.localRedirectUri}}”
},
“type”: “urlencoded”,
“response”: {
“data”: {
“expires”: “{{addSeconds(now, body.expires_in)}}”,
“accessToken”: “{{body.access_token}}”,
“refreshToken”: “{{body.refresh_token}}”
}
}
}
}
Has anyone encountered this issue before and found a solution to ensure that Make properly stores the OAuth2 access token** after authentication?
Any insights would be greatly appreciated! Thank you in advance for your help.