I am working on developing a custom extension for a 3rd party partner that launches an iframe from a contact record that opens their software and connects the same contact record if it exists, or creates a new contact record in their system if it doesn’t.
Obviously, to make that happen I need to send the unique identifier, the customers email address, but to authenticate on the other system I also am sending the current Hubspot user’s userEmail that needs to match an admin user on to that system.
So, when I am setting the iframe action URI I am manually adding in the userEmail from $_GET and then adding the “associatedObjectProperties” to pass the contact ID and Email.
For some reason though Hubspot is not recognizing the first URL params I set in the URI so I can never get myself logged in, even though if I view source on the iframe all of my variables are there. If I copy and paste the iframe source into a new window the auto-login works perfectly. It is only in the Hubspot iframe popup that it does not work.
Here is my code defining my “primaryAction”:
"primaryAction" => (object) array(
"type" => "IFRAME",
"width" => 1400,
"height" => 1000,
"uri" => "https://mydomain.com/hubspotIntegration?userEmail=".$_GET['userEmail'],
"label" => "Launch iFrame",
"associatedObjectProperties" => array(
'hs_object_id',
'email',
)
)
Can anybody help me figure this out? Does Hubspot just ignore that first variable? Is what I am trying to do even possible?