contentful/ui-extensions-sdk

Frontend URL availability

nenadg opened this issue ยท 2 comments

Hi all ๐Ÿ‘‹,

Is there any option to access given frontend url from App details via sdk? Thanks!

Hey @nenadg

If I understood you correctly, the URL you mean is the URL that renders your app?

(Correct me if I'm wrong with that assumption.)

There is no way to access the URL from the SDK as we don't allow apps to query AppDefinitions which is the entity that holds such information about the app.

However, I think to get the URL of the app you could simply access it via window.location as the app itself runs in an iframe.

I hope I could help

Yep, that's the one. Okay, thanks, I see now that I can access window.location since it's rendered in iframe. Thanks!