ResourceNotFound 404 response when retrieving IonResource using .fromAssetid

Here’s my IonResource request line which details the Asset ID…

Cesium3DTileset url={IonResource.fromAssetId(1676057)} onReady={handleReady}

Here’s the 404 response that I get…

{“code”:“ResourceNotFound”,“message”:“Resource Not Found: /v1/assets/1676057/endpoint?access_token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiJkYjk1OWEzOS0wM2UzLTQ1MmItYjVhNi0xOGE2NDAyNDc4ZjYiLCJpZCI6MjU5LCJpYXQiOjE2ODA1MzgxNTl9.ANfifMhFxb5agKqgDghPl1R__jvaz6dcEbkoNFM-txE”}

I don’t have this problem when I use the “Cesium OSM Building” asset whos ID is 96188. Replacing the asset ID in the above Ion asset request line with 96188 yields the following successful response…

{“type”:“3DTILES”,“url”:“",“accessToken”:“eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiIzNDZkMjdhMy1iY2U4LTQ5MjEtYWQ5ZC00MjFiZjZhMTdlNmIiLCJpZCI6MjU5LCJhc3NldHMiOnsiOTYxODgiOnsidHlwZSI6IjNEVElMRVMifX0sInNyYyI6ImRiOTU5YTM5LTAzZTMtNDUyYi1iNWE2LTE4YTY0MDI0NzhmNiIsImlhdCI6MTY4MjkwNDQ3MiwiZXhwIjoxNjgyOTA4MDcyfQ.NY49Wy6A-Rdm249If7nhG4sNbnMIfWljqlTfIQp1khs”,“attributions”:[{“html”:"<a href="" target="_blank"><img alt="Cesium ion" src="\“></a></span>”,“collapsible”:false},{“html”:”© <a href="\" target="_blank">OpenStreetMap contributors",“collapsible”:true}]}

How can I make my asset accessable from my React app?

More context:

I created the asset from a .glb file of a wind turbine.

Another question on the side, I am still using the default token. How do I replace the default token with the CesiumIon token that I have just created?

Thank you,

To set the default token for ion, you need to assign it to the Ion.defaultToken property at the beginning of your application:

Cesium.Ion.defaultAccessToken = "<access_token>";

Where <access_token> is a token from your account’s tokens page

See Cesium ion Access Tokens – Cesium for more info.

If you are still having problems after updating the token, let us know.