Zoho Desk ASAP JWT Not Working? Fix the Guest-Mode Widget and general_error
Your customer signs in to your app, opens the Zoho Desk ASAP widget, and gets a guest form asking for their name and email. They see no tickets. The browser shows general_error. Signing in directly on the Help Center works fine for the same person.
This is a common problem. This guide explains why it happens, what to check first, and how to fix it. It follows a question asked on Stack Overflow, and we checked the details against Zoho's current ASAP documentation.
Originally published at Zoho ASAP JWT authentication enabled but widget still behaves as guest user and asks for email/name. This article expands on that discussion.
What you'll learn:
- Why a failed JWT call makes the widget fall back to guest mode
- The checks that most often fix it, in order
- How to debug the request step by step
- When to escalate to Zoho Support
Why the widget acts like a guest
A general_error means Zoho's servers rejected the token or its context. When that happens, no authenticated session is created, so the widget behaves as it would for any anonymous visitor.
The guest form is a symptom, not the problem. You don't need an extra "apply session" step. Fix the rejected authentication, and the widget loads the user's identity and tickets.
Direct Help Center login works because it's a separate, first-party flow. The widget is embedded in your application, so it depends on your domain, token, and portal configuration all matching.
Step 1: Confirm SSO and JWT are enabled in Zoho Desk
Zoho's documentation says JWT authentication for ASAP only works when Single Sign-On (SSO) is enabled in Zoho Desk. If SSO isn't allowed, end users can only use the ASAP add-on as guests. That matches the behavior described above.
Check these settings in Zoho Desk:
- JWT authentication is turned on in the ASAP setup page of your Desk portal.
- SSO is configured. With a multi-branded portal, configure SAML in the Help Center for the ASAP department. Otherwise, configure it in the default Help Center.
- The ASAP add-on is connected to the portal where you made these settings. It's easy to configure one portal or department and point the widget at another.
Step 2: Check that your domain matches the setup page
Zoho's debugging guide for JWT errors has a simple check for web add-ons. The page hosting the widget must be on the same domain you entered on the ASAP setup page.
Look for:
- A
wwwversus non-wwwdifference - Staging, sandbox, or
localhostURLs that were never added - A mismatch in protocol (
httpversushttps) or port
Treat each distinct origin as its own entry until you've confirmed how Zoho matches them.
Step 3: Inspect your token claims
Many tutorials describe generic JWTs with name, email, iat, and exp in seconds. That's the usual JWT convention, but it isn't what Zoho's current ASAP documentation describes.
Zoho's enhanced JWT documentation for ASAP lists these claims:
| Claim | What it means |
|---|---|
email |
The user's email address |
email_verified |
A Boolean indicating whether the email is verified |
not_before and not_after |
The token's validity window, in UTC and expressed in milliseconds |
first_name |
The user's first name |
last_name |
The user's last name |
This is easy to get wrong in either direction. A developer who applies the usual "seconds" rule can send timestamps that are off by a factor of 1,000. A developer who copies a generic example can omit required claims entirely.
What to do:
- Decode the exact token your server sends, for example with jwt.io. The payload isn't secret, but never paste your signing secret into a public tool.
- Confirm the claim names match Zoho's documentation exactly.
- Confirm
not_beforeandnot_afteruse the unit Zoho specifies and that the window includes the current time. - Check your server clock for drift.
- Confirm the token is signed with the current secret and the algorithm specified on Zoho's setup page and in its documentation.
Zoho shares the secret only once, when you register the ASAP add-on. If nobody saved it or someone regenerated it, your app may be signing with an outdated value. Store it in a secrets manager, never in front-end code.
Step 4: Pass the token the way Zoho's docs describe
How the token reaches the widget matters as much as its contents. The current documentation shows the web add-on receiving the token through the ASAP settings object:
window.ZohoHCAsapSettings = {
userInfo: {
jwtToken: "generated-jwt-token"
}
};
You may also see examples that call ZohoDeskAsap.invoke("login", ...) and ZohoDeskAsap.invoke("logout", ...) once the widget has loaded. The exact method and callback signature can differ by ASAP version. Follow the current page in Zoho's ASAP developer documentation, and don't mix patterns from different guides.
Common mistakes here:
- The token is requested before the user is signed in. Your backend returns a 401 or an empty response, and the widget gets no valid token.
- A Promise or object is passed instead of the token string.
- The widget initializes before the token is ready. Generate the token first, then initialize or call login.
- The login callback result is ignored. Log the complete response so you can see whether authentication succeeded.
Step 5: Rule out stale sessions and browser restrictions
If the configuration and token look right, check two more things.
Stale state. If a guest or a different user was active earlier in the session, the widget may keep that state. Sign the previous user out of the widget when they sign out of your app, and when switching users. Don't call login in a loop. Repeated failures only add noise to your logs.
Third-party cookie restrictions. The widget is embedded in your site but communicates with Zoho domains. Safari, Firefox, Chrome, and many privacy extensions limit cross-site cookies and storage. This is a plausible reason for "Help Center works, widget doesn't," but it's a hypothesis to test, not a confirmed cause.
To test it:
- Try an incognito window with extensions disabled.
- Compare Safari, Chrome, and Firefox.
- Watch the Network and Application panels for blocked or rejected cookies on the Zoho request.
If it turns out to be the cause, ask Zoho Support about their recommended setup. Hosting your Help Center on a custom subdomain of your own domain can also help keep cookies same-site.
A debugging sequence you can follow today
- Capture the failing request in the browser Network tab, including the full response body.
- Verify SSO and JWT are enabled for the correct portal and department.
- Confirm the page domain matches the one on the ASAP setup page.
- Decode your token and compare its claims and time units to Zoho's documentation.
- Verify the secret your server signs with is the current one from setup.
- Test with a freshly generated token for a known contact. If it works, the problem is in your token endpoint. If it fails, check the configuration or browser restrictions.
- Escalate to Zoho Support if all of this checks out.
general_errorisn't specific, and Zoho can see server-side logs. Send the timestamp, org ID, portal URL, and the request and response you captured.
For a similar approach to investigating unclear API errors, see our guide to fixing invalid request issues in Zoho Mail.
Long-term practices for reliable ASAP authentication
- Generate tokens on the server only. Never expose the secret in browser code.
- Use a fresh token per login and don't cache expired tokens.
- Log token generation and login responses (never the secret) so failures are visible.
- Sign users out of the widget when they sign out of your app.
- Test across browsers as part of your release checks.
- Alert your team on repeated failures. A workflow tool such as Zoho Flow can route error notifications to the right people.
When to bring in an expert
JWT, SSO, and ASAP problems can span your app code, identity setup, and Zoho Desk configuration. If you've worked through the checklist above and still see general_error, a Zoho specialist can review the whole chain.
Creator Scripts helps businesses with integrations, custom development, and Zoho Desk setup. See our Zoho services, or book a consultation. Not sure what kind of partner you need? Read answers to the top 10 questions about Zoho partners. You can also browse more guides on the Creator Scripts blog.
If you're still evaluating Zoho Desk, you can start with Zoho Desk and see how ASAP fits your support process.
Key takeaways
- A
general_errormeans authentication was rejected, so the widget falls back to guest mode. No extra "apply session" step is needed. - Zoho's documentation says ASAP JWT login requires SSO to be enabled in Zoho Desk. Without it, users are guests.
- Make sure JWT is enabled on the ASAP setup page and the page domain matches the one configured there.
- Check your claims against Zoho's current documentation:
email,email_verified,first_name,last_name, andnot_beforeandnot_afterin milliseconds. Don't assume the generic "seconds" convention. - Pass the token the way the current ASAP documentation describes, and log the login response.
- Use stale-session and third-party-cookie tests to isolate browser-specific problems.
- If everything checks out, escalate to Zoho Support with the request details.
Verify before you ship: Zoho's ASAP documentation can change between versions. Confirm claim names, callback signatures, and setup steps in the current Zoho Desk ASAP developer documentation. For further help, visit Creator Scripts support.