Hubspot Use an an Iframe, same like wordpress Leadin Plugin

Hello,
I’m php developer and I have an query regarding to create PHP library for an hubspot. That work same as per the wordpress leadin plugin. So is that possible with API of Hubspot?
If it is possible then how to kick start on that. Please guide me reagrding this topic.
Thank You

Hi @VSolanki0,

Thank you for asking the Community!
What are you trying to achieve specifically, please? What is your ultimate goal?
The more info, screenshots (without sensitive/confidential information), and details you can provide, the better the Community can assist.
I have found this similar post “changing Hubspot settings using PHP Client Library” that might help you.
I’d like to invite a couple of subject matter experts to this conversation: Hi @lopedebeke, @coldrickjack, @TCOLINS, @AR-hz, @kasparp @crg, @fcedillo, @stefen and @Teun do you have suggestions to help @VSolanki0, please?
Also, if anybody else has anything to add and/or share, please feel free to join in the conversation :slightly_smiling_face:
Thank you very much and have a fantastic day!
Best,
Bérangère

Hello
Yes Acually we are developing extension similer to the Wordpress Leadin Plugin - For TYPO3.
We have clone the Build Javascript and Typescript from wordpress plugins and - Create custom configuration as per below and pass in the frontend and it’s working fine for First Initial Hubspot Window. - Screenshot by Lightshot
When we are going to establish connection to Hubspot, Then after the hubspot connection it will redirect to my TYPO3 site and return error like this.
Screenshot by Lightshot
Also i got the below response with values in return callback.
‘leadin_connect’:
‘portal_id’:
‘portal_domain’:
‘portal_name’:
‘access_token’:
‘refresh_token’:
‘expires_in’:
‘hublet’:
‘is_new_portal’:false
So I just want to know how this will be work is that i have miss any configuration , Here is my configuration array.

$configurationOptions = array(
			'adminUrl' => $backendURL,
			'activationTime' => time(),
			'deviceId' => $deviceID,
			'formsScript' => 'https://js.hsforms.net/forms/embed/v2.js',
			'formsScriptPayload' => '',
			'meetingsScript' => 'https://static.hsappstatic.net/MeetingsEmbed/ex/MeetingsEmbedCode.js',
			'hublet' => $_REQUEST['hublet'] ?: 'eu1',
			'hubspotBaseUrl' => "https://app.hubspot.com",
			'leadinPluginVersion' => "11.0.32",
			'locale' => "en_US",
			'restUrl' => $siteURL.'/wp-json//',
			'restNonce' => "",
			'redirectNonce' => "?page=leadin_user_guide&leadin_redirect=6bvf15cefd&is_new_portal=1",
			'phpVersion' => 8.1,
 'plugins' => [
 "leadin/leadin.php" => [
 "Name" => "HubSpot All-In-One Marketing - Forms, Popups, Live Chat",
 "PluginURI" => "http://www.hubspot.com/integrations/wordpress",
 "Version" => "11.0.32",
 "Description" => "HubSpot\u2019s official WordPress plugin allows you to add forms, popups, and live chat to your website and integrate with the best WordPress CRM.",
 "Author" => "HubSpot",
 "AuthorURI" => "http://hubspot.com/products/wordpress",
 "TextDomain" => "leadin",
 "DomainPath" => "/languages/",
 "Network" => false,
 "RequiresWP" => "",
 "RequiresPHP" => "",
 "UpdateURI" => "",
 "RequiresPlugins" => "",
 "Title" => "HubSpot All-In-One Marketing - Forms, Popups, Live Chat",
 "AuthorName" => "HubSpot",
 ],
 ],
			'portalId' => $_REQUEST['portal_id'] ?: "",
			'accountName' => "",
			'portalDomain' => $siteObject->getHost(),
			'portalEmail' => $beUser['email'] ?: '',
			'reviewSkippedDate' => "",
			'leadinQueryParams' => $this->get_hubspot_query_params_array($siteURL, $deviceID , $beUser, $domain),
			'connectionStatus' => 'NotConnected',
		);

 if (isset($_REQUEST['portal_id']) && isset($_REQUEST['refresh_token'])) {
 $configurationOptions['connectionStatus'] = 'Connected';
 $configurationOptions['refreshToken'] = $_REQUEST['refresh_token'];
 }

So can you guys guide me on this topic, Is that possible and chances for success?
Please let me know.
Thank you