Streaming live at 10am (PST)

Using the webflow API js client with typescript

It seems the Webflow js api client lacks type definitions, and there is no @types package. This makes it unusable with typescript. Is there a plan to solve this?

Hey Dana! Welcome to the forums! It’s nice to see another developer around here!

So, as of right now, the SDK that Webflow offers isn’t very robust. Unfortunately, it has been a while since the last time I saw any development to it.

I just wish Webflow would hire someone (if anyone from Webflow staff sees this, I would love a chance to talk to you guys) to take better care of the stuff that developers care about. I see so much potential for this tool, not only for designers but also for developers but it seems like devs are not their priority as of right now.

Given my experience with the platform, I would definitely recommend the use of node-fetch or another library that performs HTTP requests (Axios for example). I say this because some endpoints that are available to be accessed in the backend aren’t covered in their JS package, rendering the SDK quite ineffective.

And regarding Types for the interfaces that they offer: That’s also not available (at least not yet). You’ll have to guide yourself using the docs on this link

Feel free to get in touch at any time!

Thank you @Jeandcc! happy to be here :grinning:
I actually did opt to use Axios instead of their client.
The only issue I’m encountering now is a CORS error from their API. :cold_sweat:

1 Like

I’m glad to hear that!!

So, regarding your cors error…are you trying to run your code from an website or do you have a server running it? (Even your local machine works)

Webflow’s backend doesn’t really work well when you try to access it from the client-side. You can test things using Postman or Insomnia if you’re just trying out their endpoints

Yeah I tried it from the client side so that explains it… guess i’ll do it from the BE. Thanks for the help!!

1 Like

Great! If you need something, just say something and I’ll be around

Happy coding!

1 Like