<iframe>s .Add the following script tag to the page where you want to insert a panel:<script
type="text/javascript"
src="https://integration.seek.com/panels/SeekApi.js"
></script>
SeekApi.render function which renders an instance of a panel within a specified DOM element.If you need to conditionally load the script, you can use the following code:const script = document.createElement('script');
script.async = true;
script.src = 'https://integration.seek.com/panels/SeekApi.js';
script.type = 'text/javascript';
document.body.appendChild(script);
render function must be called on page load and whenever dynamic props change.
For example, if you have included the Ad Selection Panel and the hirer changes the position’s location, you must re-render the panel to reflect updated pricing.SeekApi.render(containerNode, panelName, props);
getAuthToken function must be supplied via props:getAuthToken: async () => {
// Do not implement caching in your `getAuthToken` implementation.
// The panel will internally memoise the response.
const token = await fetchAuthToken();
return token;
},
getAuthToken function passed to it.getAuthToken function should request a new token for the appropriate hirer ID.
If a user switches to a different SEEK hirer account or a job ad from another SEEK hirer account,
your software should ensure that subsequent invocations of getAuthToken will request a token for the new hirer ID before re-rendering the panel.getAuthToken function.POST https://graphql.seek.com/auth/token HTTP/1.1
Authorization: Bearer PARTNER_TOKEN_HERE
Content-Type: application/json
User-Agent: YourPartnerService/1.2.3
{"hirerId": "seekAnzPublicTest:organization:seek:93WyyF1h",
"scope": "query:ad-products query:organizations",
"userId": "317665"
}/en-AU/content,
you may use the locale prop to force a specific preference:SeekApi.render(containerNode, panelName, {
locale: 'id-ID'
});
SeekApi.js script as part of your application’s build process.
It must be included as a standalone script tag in your HTML page, downloaded from SEEK at runtime.SeekApi.js script if you encounter issues.
Some frameworks may not load the script correctly.
The script tag should be included directly in the HTML page where you want to insert a panel.getAuthToken function requests a browser token for the appropriate hirer ID each time.
For example:positionProfileId A, posted through hirer Arender to display the panelgetAuthToken function is invoked, and must return a browser token for hirer ApositionProfile B, posted through hirer Brender to refresh the panel’s viewgetAuthToken function is invoked, and must return a browser token for hirer Bhttps://integration.seek.com/panels/SeekApi.js in your browser’s developer tools .
If it has not loaded, check for common problems.To troubleshoot a problem with a panel,
open the developer tools in your web browser and try the following:window.SEEK_PANEL_DEBUG = true in your browser consoleThis will enable additional logging in the panel.
The panel will then log its props every time SeekApi.render is called with valid props.
This may help you identify issues with unexpected behaviour or missing props.