How to change the header when requesting b3dm files?

Hi, In my app I add a tileset with the url and a header that contains authorization information which is a token:

  const resource = new Resource({
    url: url,
    headers: {
      Authorization: `Bearer ${token}`

  const tileset = new Cesium3DTileset({
    url: resource

This token renews every 5 Minuten.

When a request is set up to load new b3dm files when the location is changed, I always get a 401 error for these b3dm files after 5 Minutes. Is it possible to reset the header with the new valid token?

Hi there,

Do you happen to have any luck with using the retryCallback like in the first example on this page?

1 Like

Yes, thank you. It’s the best solution for this issue, thanks!