Accessing images through a url

I am able to connect to a resource and pull out some data(from onshape). Among many things in this data, there are URLs to images. When copy and pasting into the browser, these URLs do successfully pull an image, as long as I am signed into my onshape account in another tab. These URLs do not work within retool even if I am signed into my onshape account. I'm having trouble wrapping my head around making it so that the image service that is supplying images that are not public but are accessible to me(as long as I'm signed in), allows retool to also access them. The issue I feel stuck on is that using the URLs seems separate from querying because no authentication gets passed.

Hey @shawncrocker!

Is this something you're still having issues with? I'm not personally very familiar with onshape, do you know what kind of auth method is being used for the links you're generating? Is it possible to embed them in, for instance, an image tag within a plain HTML file?

<img src="https://your.onshape.image/url" />

Lastly, do you know if they have anything akin to a signed url which you might be able to use?

Hi @Kabirdas Sorry, I didn't notice for some reason you commented here. Yes, I still have the same issue. The image urls are not signed urls. For the auth method, I can use an oauth or a basic api key/secret combination. ATM I am actually setup with both. retool has been correctly registered in onshape as a web app. But still, the urls will not work within retool which I find so strange. I have received some help from onshape API support but they spoke of the urls main purpose as being used internally within the onshape environment. But copy and pasting the url into a browser does work so I'm afraid I'm unable as of yet to fully let the goal of using these urls within retool die. As a brief summary, onshape is a cloud based engineering/design tool. Any 3d objects that exists in our companies onshape account can be communicated with through the API. I can make a call for an objects metadata, which is what I am doing here. One can include in the end point parameters that they would also like to include a thumbnail url with the data. This is how I am getting the urls. For the time being, I am getting around this hump by taking the url and making another call to onshape feeding in the url which sends back base64 data for the image. I really want to skip that step because it doubles the query times and adds extra storage when I end up storing everything in a google sheet. I can also only use a fairly small image to stay beneath google sheets 50000 character cell limit.

Hey @shawncrocker!

Could you try looking at your browser console to see what particular errors you're getting, if any? It may also help if you can find the request being made to the onshape URL in your networking tab.

I'm also wondering what happens if you try passing the URL to an iframe with "Storage and cookies" enabled:

And again, as mentioned above, would like to know if it's possible to embed the image outside of Retool.

I'm not sure this is possible, but definitely down to explore!