APIs & Integrations

okangul
Participante

Trouble Passing User cookie to CRM Card Iframe

resolver

We have a button in our custom CRM Card that opens up a page in our actual system in an IFRAME. The problem that we are having is, even the user is logged into our system in the browser the IFRAME shows them not logged in. So I believe the user cookie is not passed to the IFRAME, it used to work when we first published our app but it suddenly stop working, can anybody help us figure this out?

0 Me gusta
1 Soluciones aceptada
hilton22
Solución
Colaborador | Partner nivel Diamond
Colaborador | Partner nivel Diamond

Trouble Passing User cookie to CRM Card Iframe

resolver

Hi @okangul,

 

If I understood correctly, the problem here is log you user in you app, once this user load the object page (contact, deal, ticket etc) containing the widget/CRM card, right?

 

Ok... I believe that you will have a problem working with hubspot cookies and iframes... those two thing doesn't work very well together... 😞

 

My sugestion here for you, is work with the request that Hubspot make to your application. At the very moment that your CRM card is loaded on the Hubspot page, Hubspot send to your app a request (GET) to the endpoint that you provided, to load the card in the Hubspot page.

Hubspot add some parameters in this endpoint of yours, like the ID and e-mail of the hubspot user that is trying to load the CRM card, for exemple. 

 

Maybe you can use this parameters to log your user in.

 

You can have more information in this documentation here in the "Data fetch request " section.

 

I hope I've helped.

 

Cheers,

Ver la solución en mensaje original publicado

3 Respuestas 3
hilton22
Solución
Colaborador | Partner nivel Diamond
Colaborador | Partner nivel Diamond

Trouble Passing User cookie to CRM Card Iframe

resolver

Hi @okangul,

 

If I understood correctly, the problem here is log you user in you app, once this user load the object page (contact, deal, ticket etc) containing the widget/CRM card, right?

 

Ok... I believe that you will have a problem working with hubspot cookies and iframes... those two thing doesn't work very well together... 😞

 

My sugestion here for you, is work with the request that Hubspot make to your application. At the very moment that your CRM card is loaded on the Hubspot page, Hubspot send to your app a request (GET) to the endpoint that you provided, to load the card in the Hubspot page.

Hubspot add some parameters in this endpoint of yours, like the ID and e-mail of the hubspot user that is trying to load the CRM card, for exemple. 

 

Maybe you can use this parameters to log your user in.

 

You can have more information in this documentation here in the "Data fetch request " section.

 

I hope I've helped.

 

Cheers,

okangul
Participante

Trouble Passing User cookie to CRM Card Iframe

resolver

Hi @dennisedson 

Thanks for your reply. There isn't any specific error, the server just returns HTTP 401 because of the lack of user information even I am logged into the system with my admin account in the same browser.Screen Shot 2021-03-18 at 11.58.15 AM.png

0 Me gusta
dennisedson
Equipo de producto de HubSpot
Equipo de producto de HubSpot

Trouble Passing User cookie to CRM Card Iframe

resolver

Hi @okangul 

Are you getting any error messages? 

Adding a few people to the conversation.

@SamKreeke , @EkramulHuq , @Ali7 , @hilton22 , @catalinsendsms  can any of you offer some help 😀

0 Me gusta