It's easy to call your API from within your Node.js application!
The first thing you'll want to do is create a
.env file in your project that includes the secrets
When you're in your project in the TakeShape web client, you can find your project's endpoint in the sidebar of the API
tab. Copy it into your
You can also create an API Key from within the API tab. Pick the
dev permission for your key, then
save it. After saving, you'll be presented with a one-time secret string. Copy it into your
Once you've got your secrets, install some libraries to help make your request:
Now, querying TakeShape is as simple as making an asynchronous network request:
Run this file with
node takeshape.client.js and you'll see it return your data!