Zoho sign Credentials not refresh oauth2 token automatically

I contacted Zoho support this week, had a zoho call with the service tech support about the token not being updated, or rather the request only updates the token and within 59 minutes you can make requests. we haven’t reached a solution.

Anybody have a solution or resolve?

Yes, that’s right the service token is not updating correctly on the n8n side. I actually wanted to make a separate topic. Now it happens like this:

A request to the zoho service does not return a response but only updates the token. request fall with error:

The connection to the server was closed unexpectedly, perhaps it is offline. You can retry the request immediately or wait and retry later.
Error details
From HTTP Request
Error code
ECONNRESET
Full message
socket hang up
Request
“{ “headers”: { “accept”: “application/json,text/html,application/xhtml+xml,application/xml,text/;q=0.9, image/;q=0.8, /;q=0.7”, “Authorization”: “hidden”, “content-type”: “multipart/form-data; boundary=--------------------------624483493500454646464” }, “method”: “POST”, “uri”: “https://sign.zoho.com/api/v1/templates/3534534534535/createdocument”, “gzip”: true, “rejectUnauthorized”: true, “followRedirect”: true, “resolveWithFullResponse”: true, “followAllRedirects”: true, “timeout”: 300000, “formData”: { “_overheadLength”: 320, “_valueLength”: 1394, “_valuesToMeasure”: , “writable”: false, “readable”: true, “dataSize”: 0, “maxDataSize”: 2097152, “pauseStreams”: true, “_released”: true, “_streams”: , “_currentStream”: null, “_insideLoop”: false, “_pendingNext”: false, “_boundary”: “--------------------------6244834935002453543453453”, “_events”: { “end”: [ null, null ], “error”: [ null, null ], “close”: [ null, null ] }, “_eventsCount”: 3 }, “encoding”: null, “json”: false, “useStream”: true }”

, the second request within the token validity (60 minutes) is executed normally.


green - next call inside ~60 min token. Red is first call.

I have Zoho Sign and queries eat credits, the limit of test (free queries has already been exhausted in a few days.

Nope it not works correctly, same error after auth after first call. First call every ime is with error, second is OK because token revoked, my settings is correct

i will do generic connection myself too, not helps, same behavior solution like here Oauth2 Token Not Refreshing is not working

I tried to show you in as much detail as possible what I get at the output.
What’s wrong with my settings?

( in oauth predefined Zoho CRM Credentials url with changed connecting scopes from CRM scopes to Zoho Sign works absolutely same with same errors)

Information on your n8n setup

  • **n8n version: latest
  • **Database (default: SQLite):default
  • **n8n EXECUTIONS_PROCESS setting (default: own, main):default
  • **Running n8n via (Docker, npm, n8n cloud, desktop app):docker
  • **Operating system: default

I think I found the problem, after running the query
n8n export:credentials --id=wecAaZnrFnYiCUxi --decrypted

User settings loaded from: /home/node/.n8n/config\n[{“createdAt”: “2024-09-29T10:58:13.978Z”, “updatedAt”: “2024-10-06T12:00:23.121Z”, “id”: “wecAaZnrFnYiCUxi”, “name”: “ZOHO SIGN SC”, “data”:{“grantType”: “authorizationCode”, “authUrl”: “https://accounts. zoho.com/oauth/v2/auth”, ‘accessTokenUrl’: ‘https://accounts.zoho.com/oauth/v2/token’, ‘clientId’: ‘1000.5MIN5IO15Uxxx’, ‘clientSecret’: ‘d94fexxx’, ‘scope’: ”ZohoSign.documents.ALL,ZohoSign.templates.ALL,ZohoSign. account.ALL“, ‘authQueryParameters’: ‘access_type=offline’, ‘authentication’: ‘header’, ‘ignoreSSLIssues’:false, ‘oauthTokenData’:{”access_token": ‘1000.5f215f90xxx’, ‘scope’: ”ZohoSign.documents.ALL ZohoSign.templates.ALL ZohoSign. account.ALL“, ‘api_domain’: ‘https://www.zohoapis.com’, ‘token_type’: ‘Bearer’, ‘expires_in’:3600, ‘callbackQueryString’:{”location": ‘us’, ‘accounts-server’: ‘https://accounts.zoho.com’}, ‘refresh_token’: ‘1000.8xxx’}}, ‘type’: ‘oAuth2Api’}]

i see refresh_token": ‘1000.8xxx… but my refresh token in dasboard is refresh_token’: ”1000.1a8yyy… (i know this refresh token for another method, but maybe solution is near)

Your setup in n8n looks right. Follow the steps on this page where i posted about this already

It might be down to the setup in the zoho api console

Thank you Liam, i recreated service app in Zoho console and credential in n8n, same result, same errors.

I had this same issue with Zoho work drive.
I was in a hurry so I made a really janky workaround, but that has been working for a while, it hasn’t broke in about 6 months in production.

I’ll go find the workflow and share it with you in case it’s the same Zoho issue

@lightcom here is the workflow you can use as a workaround to the Zoho Oauth

Go into “this workflows code” and copy and paste it into your n8n instance.
If you follow the instructions there it should get you up and running if it was the same issue I had.

This is not usually something i would recommend but sometimes you just need to get something working

It’s still pretty secure since it is putting your refresh token in an auth record, but use at your own risk.

Make sure you read all of the instructions on there and let me know if you have any questions

i meant to dive deeper to see if this was an n8n bug bit it’s the only time i have experienced this with n8n. And with my history with Zoho i tend to assume issues are on Zoho’s side. From the small amount of digging I did before, there is a missing parameter being sent back during the oauth setup

1 Like

Strange but i receive access_token but not refresh token

After put that token in auth i got error when autw with custom auth in module with refresh token

My solution is: create scenario with get api call which no consume credits, and 3620 seconds (which bigger than 3600) waiting node, which relaunch scenario via webhook. it’s okey in my case.

i am put telegram nodes to make sure that second call is working fine

What’s good about this scenario is that we don’t move away from Oauth2 authentication and still get an updated token every hour (+some delay).

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.