Streaming live at 10am (PST)

Help getting sites/collections/items/Fields data

I tried to get my site in order to get the inputs of my fields however it doesn’t seem to be working.

The main idea of what I want to do eventually is to make it so onclick of a media item, the main video iframe changes it’s link to the relevant item.
The entire youtube link is saved in a collection list called media under Media Link or Video Link (They have the same links)

Here is my code so far that returns nothing and doesn’t create an alert box even, if someone would be kind enough to point me in the right direction that would be amazing!

const webflow = new Webflow({ token: '82727037e43cb652270a3871ac0647d89081a7f52182e34a74bacc19c9b511e2' });

// Promise <[ Site ]>
const sites = webflow.sites();

sites.then(s => window.alert(s));

Here is a link to my site:

Thank you in advance!

Site is unpublished. I also can’t find where you are using the above code in your site.

I don’t think the API is meant to be “initialized” this way.

Side note, you shouldn’t be using API keys in JS, as anyone can “steal” them and make modifications to your site using that key.

You also shouldn’t be posting the key in the forum (although I have verified that the key works and I can retrieve your site).

Example of a single item in your media collection:

  "items": [
      "_archived": false,
      "_draft": false,
      "category": "6d6a83f68ba2094312adcbc8568da3c7",
      "video-link": "",
      "name": "Yashar El",
      "media-image": {
        "fileId": "594ae7f63ca9026bddba3d79",
        "url": ""
      "slug": "yashar-el",
      "updated-on": "2017-06-28T13:20:27.045Z",
      "updated-by": "Person_5843d27a6f48a0766b95d64e",
      "created-on": "2017-06-12T20:23:05.680Z",
      "created-by": "Collaborator_593d959ee5608a435f48f80c",
      "published-on": "2017-06-28T13:20:33.488Z",
      "published-by": "Person_5843d27a6f48a0766b95d64e",
      "media-video": {
        "url": "",
        "metadata": {
          "width": 250,
          "height": 141,
          "html": "<iframe class=\"embedly-embed\" src=\"//\" width=\"250\" height=\"141\" scrolling=\"no\" frameborder=\"0\" allowfullscreen></iframe>",
          "aspectRatio": 1.7730496453900708,
          "title": "דוד ד׳אור - ישר אל (עם מילים)",
          "provider_name": "YouTube",
          "type": "video",
          "description": "Join David D'or on facebook here: הצטרפו לעמוד הרשמי של דוד בפייסבוק כאן: Subscribe to David's main Youtube Channel: הצטרפו לערוץ הראשי של דוד ביוטיוב על ידי לחיצה כאן: Buy David's Music on Loudr (better prices) : The whole Discography available on iTunes: מילים: ---------- מזמן",
          "author_name": "David Deor"
      "_cid": "594ae7f63ca9026bddba3a8d",
      "_id": "594ae7f63ca9026bddba3cf0"
  "count": 1,
  "limit": 100,
  "offset": 0,
  "total": 58