APIs & Integrations

okangul
Teilnehmer/-in

Trouble Passing User cookie to CRM Card Iframe

lösung

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 Upvotes
1 Akzeptierte Lösung
hilton22
Lösung
Mitwirkender/Mitwirkende | Diamond Partner
Mitwirkender/Mitwirkende | Diamond Partner

Trouble Passing User cookie to CRM Card Iframe

lösung

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,

Lösung in ursprünglichem Beitrag anzeigen

3 Antworten
hilton22
Lösung
Mitwirkender/Mitwirkende | Diamond Partner
Mitwirkender/Mitwirkende | Diamond Partner

Trouble Passing User cookie to CRM Card Iframe

lösung

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
Teilnehmer/-in

Trouble Passing User cookie to CRM Card Iframe

lösung

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 Upvotes
dennisedson
HubSpot-Produktteam
HubSpot-Produktteam

Trouble Passing User cookie to CRM Card Iframe

lösung

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 Upvotes