APIs & Integrations

okangul
参加者

Trouble Passing User cookie to CRM Card Iframe

解決

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 いいね!
1件の承認済みベストアンサー
hilton22
解決策
投稿者 | Diamond Partner
投稿者 | Diamond Partner

Trouble Passing User cookie to CRM Card Iframe

解決

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,

元の投稿で解決策を見る

3件の返信
hilton22
解決策
投稿者 | Diamond Partner
投稿者 | Diamond Partner

Trouble Passing User cookie to CRM Card Iframe

解決

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
参加者

Trouble Passing User cookie to CRM Card Iframe

解決

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 いいね!
dennisedson
HubSpot製品開発チーム
HubSpot製品開発チーム

Trouble Passing User cookie to CRM Card Iframe

解決

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 いいね!