Using the ui component, how do I authorize the scheduler-editor component so that the user doesn’t need to login themselves.
Hello @sboynton unless you have a grant for those users, they need to authenticate in order to use the scheduler…but less me ask anyways…
I have a configurationId which requires a grantId to create. I pass it into the scheduler-editor component and it still requires me to login. @Blag
For example, how do I get this code below to bypass logging in and go right into the editor. The configurationId isn’t doing it @Blag
<script type="module">
const schedulerEditor = document.querySelector("nylas-scheduler-editor");
schedulerEditor.schedulerPreviewLink = `${window.location.origin}/?config_id={config.id}`;
schedulerEditor.nylasSessionsConfig = {
clientId: 'replace', // Replace with your Nylas client ID from the previous section
redirectUri: `${window.location.origin}/scheduler-editor.html`,
domain: "https://api.us.nylas.com/v3", // or 'https://api.eu.nylas.com/v3' for EU data center
hosted: true,
accessType: "offline",
};
schedulerEditor.configurationId = "replace";
schedulerEditor.defaultSchedulerConfigState = {
selectedConfiguration: {
requires_session_auth: false, // creates public configuration which does not require session tokens
scheduler: {
// callback URLs to be set in email confirmation messages
rescheduling_url: `${window.location.origin}/reschedule/:booking_id`,
cancellation_url: `${window.location.origin}/cancel/:booking_id`,
},
},
};
</script>
This should be explained in our docs Configure authentication for the Scheduler Editor Component | Nylas Docs