Maaz Zindani

Loading the index…

↑↓ move↵ openesc close4072 pages

Help for owners

My connection to Zoho keeps failing because the token expired

Short answer

Zoho access tokens last 1 hour, so a working connection must renew itself with a refresh token all the time. Zoho also caps renewals at ten access tokens per ten minutes per refresh token, ties a refresh token to one organization, and uses a different accounts address per data centre. A drop usually means one of these.

  • Written for business owners
  • Updated
  • By Maaz Zindani, Senior Software Engineer

Does this sound like your situation?

  • My app says the Zoho token is invalid or expired and asks me to log in again.
  • It works for a short while after I reconnect, then fails.
  • Zoho calls fail with an authentication error but the same login works in the browser.
  • It broke after I moved to a test copy or a new server.
  • My Zoho account is on the EU or India site and the connection never works.

Why does this happen?

  1. Access tokens are short on purpose

    Zoho states that the lifetime of an access token is 1 hour. Every working connection therefore asks for a new one all day, using a refresh token, without anyone clicking anything.

  2. The app asks for new tokens too often

    Zoho states that a refresh token can create up to ten access tokens in a span of ten minutes, and that token creation is blocked for the rest of that window once the limit is reached. A tool that asks for a fresh token on every call, or several copies renewing at once, runs into this.

  3. The wrong Zoho region is used

    Zoho runs separate data centres, and each one stores only the data of users registered at its own domain. The token response includes an api_domain, and Zoho says API requests should go to that address rather than a fixed one. An app hard-wired to the US address fails for an account registered elsewhere.

  4. The token belongs to one organization and environment

    Zoho CRM states that a refresh token cannot be used for another organization, so a token from the live account will not work for a sandbox or developer account. Copying a token between environments is a common cause of sudden failures.

  5. The login was removed on the Zoho side

    If the person who authorised the connection is removed, or the app's access is revoked in Zoho, the next renewal fails until someone authorises again.

What can I do about it today?

  1. Note the dates and the exact error textWrite down when each failure happened and copy the message. Also note what changed just before: a restart, a new server, a staff change.
  2. Find out which Zoho site you useLook at the address you sign in to. A .com, .eu, .in, .com.au or other ending tells your developer which data centre your account is in.
  3. Check who authorised the connectionMake sure that person still has an active Zoho user with the access the integration needs.
  4. Ask whether a second copy is runningA test site or an old server using the same Zoho connection can use up renewals and break the live one.
  5. Reconnect once, not repeatedlyRepeated reconnects while two copies run can undo each other. Reconnect once after the cause is found.

When should I bring someone in?

  • The connection drops more than once, or Zoho records are not arriving between drops.
  • Nobody knows where the app keeps its Zoho login or which Zoho organization it points to.
  • The failures started after a move to a new server, a sandbox or a different Zoho region.

How do I handle it?

  1. Read the vendor's current rules firstI read Zoho's current token documentation and test every change against a sandbox or test data before it touches your live records.
  2. List every copy of the connectionI find each place that holds a Zoho login: live, test, old server and scheduled jobs, and note which organization and data centre each one points to.
  3. Renew sparingly and store safelyThe app keeps one access token until it is near its end, renews it once, and keeps the refresh token in a protected place, so the ten per ten minutes limit is not reached.
  4. Use the address Zoho returnsAPI calls go to the api_domain that came with the token, so the account's region is followed instead of assumed.
  5. Make failure visibleA rejected token pauses sending and tells you, so records are not lost silently.

The price depends on what I find, so I quote in writing after a short discovery call. Tell me what is happening and I reply within 24 hours.

What do owners ask about this?

Can I get a Zoho token that never expires?

Zoho states that an access token lasts 1 hour, so every connection depends on renewing it. What you can control is that the renewal is stored and run correctly.

Why does it fail only for my account and not in the demo?

A different data centre is the usual reason. Zoho states that each data centre holds only the users registered at its own domain, so the address used must match your account.

Do I lose my Zoho data when it drops?

Data already in Zoho stays. Anything the app tried to send while locked out may be missing until it is sent again.

Sources

How was this page made?

I drafted this page with AI assistance from the official documents listed under Sources. Found a mistake? Tell me.

For your developer: the technical fixes

Next step

Want this off your desk?

Send me a few lines on where things stand. I reply within 24 hours.