Hey @Sudarshan Bhat
Short-lived JWTs are supported on Android and React Native, there isn’t a platform-specific limitation documented, but there are a couple of important details in how the Android SDK uses them.
How the Android SDK expects JWTs to be used
From the native docs, the pattern is:
// Kotlin / Android native
Intercom.client().setUserJwt("your_jwt_token_from_server")
// then register / log in the user
Once set, the SDK attaches that JWT to every request until you replace it with a new one via another setUserJwt(...) call. The token is validated on each request, not just at boot.
Given that:
-
Your overall pattern is correct, but 5 minutes is very aggressive
- A 5-minute TTL means any gap in your refresh loop (app backgrounded, device asleep, flaky network) can easily leave Android making a request with an expired token.
- We generally recommend aligning the JWT
exp with your app session length (e.g. 30–60 minutes, or whatever your own auth session is), and then refreshing when your app’s auth/session refreshes.
-
On Android, the new JWT is only used for requests that happen after you call setUserJwt()
Things to double-check in your implementation:
- Make sure
Intercom.setUserJwt(refreshedToken) is called before any call that might touch Intercom (login, updateUser, displayMessenger, etc.), not just on an interval in the background. - Don’t call
login/register again with stale state after you’ve set the new JWT – if you log the user in again without re-setting the JWT first, those calls can still be made under the old token.
-
How to debug if Android is still ignoring the new token
- In your workspace, go to Settings → Messenger → Security → Installation logs and look at the recent Android entries. You should see the JWT payload + exp for each request – if Android is still sending the old token after your refresh, we can treat that as a bug in the RN wrapper.
- If those logs show the new token but you still get “expired/invalid JWT” errors, then the issue is on the backend side (e.g. clock drift or too-short TTL).
Practically, I’d suggest: