I'm currently trying to work with an integration with an external API (Lansweeper). When trying to authenticate the API, I'm running into an issue where they authenticate through an external url (https://app.lansweeper.com/authorize-app/XXXXX) where you can login with their credentials. They would then redirect the page to a site (https://https://xxxxx.com/public/services/apexrest.com/authCallback?code=XXXXXX) is currently what I have. I have a RestResource that can get the code, but it currently generates a blank page. Is there a way to close the tab that is generated from this?
I'm also up for other methods for authenticating this.
The end goal I'm trying to do is to get Lansweeper asset data and populate a LWC on the Salesforce Assets record page on load, or even through a button click. To accomplish this, I was trying to connect to Lansweeper and get the data, but I've gotten stuck at the first step with authenticating.