Giter Club home page Giter Club logo

Comments (2)

jacobwgillespie avatar jacobwgillespie commented on May 27, 2024

This should actually already be possible - I'll see about getting some documentation added. The third argument to the createItem function controls the URL query params, so you should be able to do the following with { live: true }:

const webflow = new Webflow({ token: api_token });

// Promise <Item>
const item = webflow.createItem({
  collectionId: '580e63fc8c9a982ac9b8b745',
  fields: {
    // The data
  },
}, { live: true });

item.then(i => console.log(i));

from js-webflow-api.

janpapenbrock avatar janpapenbrock commented on May 27, 2024

I feel like this is not working properly. Calls without { live: true } are passing properly, but once I add that, calls start to fail.

I'm calling like this:

return webFlowApi.createItem({ collectionId: myCollectionId, fields: item }, { live: true });

And I am receiving this error:

WebflowError: NotFound: Collection not found: null

I debugged into the calls and it looks like the POST URL is built just like shown in the documentation, i.e. https://api.webflow.com/collections/<my-id>/items?live=true, but I still get the error response back (404 from the server).


@kyleshevlin I read your post in a different issue regarding the priority of this project, and I appreciate the time you spend here voluntarily! I'm only pinging you directly as this appears to be an API issue and not an issue with this library, so maybe you guys want to check that.

from js-webflow-api.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.