# Why it is giving 701 always?

**URL:** <https://forums.nylas.com/t/why-it-is-giving-701-always/548>\
**Category:** Question and Answers\
**Tags:** scheduler\
**Created:** [October 30, 2024, 11:07am UTC](https://forums.nylas.com/t/why-it-is-giving-701-always/548 "2024-10-30T11:07:50Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![vishal](https://avatars.discourse-cdn.com/v4/letter/v/49beb7/32.png) [@vishal](https://forums.nylas.com/u/vishal)\
**Post date:** [October 30, 2024, 11:07am UTC](https://forums.nylas.com/t/why-it-is-giving-701-always/548/1 "2024-10-30T11:07:50Z")

</div>

![image](https://us1.discourse-cdn.com/flex015/uploads/nylas3/original/1X/b03484c2b0be4d18019b497f8e2cb8795c4d552b.png)

CODE:  
index.html:

```auto
<!-- index.html -->

<!DOCTYPE html>
<html class="h-full bg-white" lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Nylas Scheduling Component</title>

    <link rel="preconnect" href="https://fonts.googleapis.com" />
    <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
    <link
      href="https://fonts.googleapis.com/css2?family=Inter:wght@100..900&display=swap"
      rel="stylesheet"
    />

    <script src="https://cdn.tailwindcss.com"></script>

    <style type="text/css">
      body {
        font-family: "Inter", sans-serif;
      }
    </style>
  </head>

  <body>
    <div class="grid gap-0 h-full place-items-center">
      <div class="grid gap-4">
        <!-- A button to view the Scheduler Editor -->
        <a
          href="scheduler-editor.html"
          class="w-fit border border-blue-500 hover:bg-blue-100 text-blue-500 font-bold py-2 px-4 rounded"
        >
          View Scheduler Editor
        </a>

        <!-- Add the Nylas Scheduling Component -->
        <nylas-scheduling></nylas-scheduling>
      </div>
    </div>

    <!-- Configure the Nylas Scheduling Component with a scheduler configuration ID -->
    <script type="module">
      import { defineCustomElement } from "https://cdn.jsdelivr.net/npm/@nylas/web-elements@latest/dist/cdn/nylas-scheduling/nylas-scheduling.es.js";

      defineCustomElement();

      const nylasScheduling = document.querySelector("nylas-scheduling");

      // Set the scheduler api url based on the data center
      nylasScheduling.schedulerApiUrl = "https://api.us.nylas.com"; // or 'https://api.eu.nylas.com' for EU data center

      // Get the scheduler configuration ID from the URL ?config_id=NYLAS_SCHEDULER_CONFIGURATION_ID
      const urlParams = new URLSearchParams(window.location.search);

      // If not config_id exists, throw a console.error
      if (!urlParams.has("config_id")) {
        console.error(
          "No scheduler configuration ID found in the URL. Please provide a scheduler configuration ID."
        );
      }

      // Set the scheduler configuration ID
      nylasScheduling.configurationId = urlParams.get("config_id");
    </script>
  </body>
</html>

```

scheduler-editor.html:

```auto
<!-- scheduler-editor.html -->

<!DOCTYPE html>
<html class="h-full bg-white" lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Nylas Scheduler Editor Component</title>

    <link rel="preconnect" href="https://fonts.googleapis.com" />
    <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
    <link
      href="https://fonts.googleapis.com/css2?family=Inter:wght@100..900&display=swap"
      rel="stylesheet"
    />

    <script src="https://cdn.tailwindcss.com"></script>

    <style type="text/css">
      body {
        font-family: "Inter", sans-serif;
      }
    </style>
  </head>

  <body class="h-full">
    <div class="grid h-full place-items-center">
      <!-- Add the Nylas Scheduler Editor component -->
      <nylas-scheduler-editor />
    </div>

    <!-- Configure the Nylas Scheduler Editor component -->
    <script type="module">
      import { defineCustomElement } from "https://cdn.jsdelivr.net/npm/@nylas/web-elements@latest/dist/cdn/nylas-scheduler-editor/nylas-scheduler-editor.es.js";

      defineCustomElement();

      console.log(window.location.origin, "log");

      const schedulerEditor = document.querySelector("nylas-scheduler-editor");
      schedulerEditor.schedulerPreviewLink = `${window.location.origin}/?config_id={config.id}`;
      schedulerEditor.nylasSessionsConfig = {
        clientId: "582-------", // Replace with your Nylas client ID from the previous section
        redirectUri: `${window.location.origin}/scheduler-editor`,
        domain: "https://api.us.nylas.com/v3", // or 'https://api.eu.nylas.com/v3' for EU data center
        hosted: true,
        accessType: "offline",
      };
      schedulerEditor.defaultSchedulerConfigState = {
        selectedConfiguration: {
          requires_session_auth: false, // Creates a public configuration which doesn't require a session
          scheduler: {
            // The callback URLs to be set in email notifications
            rescheduling_url: `${window.location.origin}/reschedule/:booking_ref`, // The URL of the email notification includes the booking reference
            cancellation_url: `${window.location.origin}/cancel/:booking_ref`,
          },
        },
      };
    </script>
  </body>
</html>

```

---

<div class="post-metadata">

**Author:** ![akay](https://avatars.discourse-cdn.com/v4/letter/a/c37758/32.png) [@akay](https://forums.nylas.com/u/akay)\
**Post date:** [October 30, 2025, 3:47am UTC](https://forums.nylas.com/t/why-it-is-giving-701-always/548/2 "2025-10-30T03:47:51Z")

</div>


