SMS API

Hello,

I am trying to execute an SMS API for Javascript but it is using “require” and the editor shows an error with it.

However, it also says that it may work if I add the node plug-in to be running. How can I do that?

Anyone knows?

Thank you

Hi,
Currently Wix Code does not support require for node modules.
However, if you get the right code for using the API (maybe through github or some other code sharing platform) you can copy and paste the code to wix code editor (and create a module under ‘public’).

Hop this helps,
Liran.

Liran – I am not sure if this is the right forum post, but I think I am trying to do what you’ve referred to above.

I have the GitHub for the Stripe API I am trying to use: GitHub - stripe/stripe-node: Node.js library for the Stripe API.

In the instructions, the first thing I need to do is install the npm npm install stripe --save . Does Wix Code support this? Can you give a little more insight on how this is done? I’ve spent weeks trying to figure out Stripe integration for Wix Code, so this would be massive if it is on the right track.

Hi David,
Unfortunately, using npm install (and then ‘require()’) is currently not supported.
We are aware of the importance of that feature.

Meanwhile, consider trying a RESTful API (which is more similar to what you did with the pictures).
You can search the web for such APIs, but here’s an example I just found, could be enough for you.

I hope it helps, let me know how that works.

Liran.

Thanks Liran – I’m saving this post for later. Need to sort through another issue first before I venture down this path. Regardless, when I cross this bridge I will follow up with a solution here.