i am doing xero api 2 factor authentication from Hubspot workflow custom code.. and i want to hit the user autherization redirect url that can be open a new xero login window and after login, i select the organization and he gave me the access token and refresh token.but i am not able to open the new login window from autherization redirect url in workflow custom code.
Status: Idea Submitted
HubSpot workflow custom code runs server-side, so it can’t open a browser window for Xero’s login.To handle Xero’s OAuth 2.0 login, you need to trigger the login flow from a client-side app or page, not from the server code. Instead, redirect the user to a custom HubSpot landing page that includes a button linking to the Xero auth URL. Once the user logs in and selects their org, Xero redirects to your redirect URI with a code.Set up a backend (e.g., serverless function) to exchange that code for tokens .Then store the access and refresh tokens in HubSpot using custom properties or a secure storage.Call Xero APIs later from workflow custom code using those stored tokens.
I suggest you give a try Hubspot xero integration app This will help to convert deals into Xero invoices & powerful HubSpot workflow actions for Xero
. If you have any questions, you can book a free consultation; their experts will help you integrate - https://meetings.hubspot.com/cloudify/app-assistance