Call ModernTax.create (clientId, settingsId, options) to launch the ModernTax dialog. You can find your Client ID in the API Keys page of your ModernTax dashboard (https://app.moderntax.io/api-keys).
You can retrieve "SettingsId" by calling the "Invite" API. Otherwise, you can use the value 'default'. This value is required and it defines the set of needed data to be fetched through ModernTax API.
The onSuccess callback will be triggered once the taxpayer has successfully connected their IRS account to ModernTax by logging in to their IRS account. Use the returned taxpayerId to make API requests.
onSuccess: (taxpayerId) => console.log(
"saving tax payer id " + taxpayerId + " from ModernTax"
The ModernTax dialog can be launched from a button with a click handler:
<button id="moderntax">Connect Your IRS Account</button>