cancel
Showing results for 
Search instead for 
Did you mean: 

Using streamwork apis (set_data) in a sub domain

0 Kudos
114

When a Gravity item is created in a StreamWork Activity, we embed an IFrame in the item and point the source of the IFrame to a URL(https://www.gravity.streamwork.com/gravity?modelId=someModelId) and there is no way we can use StreamWork Javascript APIs in the gravity domain. We cannot detect any changes to the Gravity content in the StreamWork Javascript files because the control is no longer in StreamWork domain.

Gravity domain is a sub domain of StreamWork domain. Is there a way to access StreamWork APIs in the subdomain ?

Regards

Sreekanth

Accepted Solutions (0)

Answers (1)

Answers (1)

0 Kudos

Hi Sreekanth,

this won't work because the hostnames do not match. Every modern browser will prevent this due to XSS. Are you using the OpenSocial or Methods API? Would proxying help you?

Simon

0 Kudos

Thanks Simon for the reply.

We use Methods API and it looks like it is not possible to access those APIs in my javascript code.

Can you please explain more about how proxying would help ?

Regards

Sreekanth

RuedigerMueller
Advisor
Advisor
0 Kudos

Hi Sreekanth,

I am not sure but Simon might have referred to using streamwork.io (https://streamwork.com/api/methods/Making_remote_requests.html).

Regards,

Rüdiger