Connecting Your Scenario to Non-Supported Web Services

Connecting Your Scenario to Non-Supported Web Services Hi there and welcome to another video on some of the intermediate features of integramatte in this video we'll be taking a look at how to set up your own api requests.

Using our http module to connect to online services that have api endpoints but first what is api api is essentially the messenger that delivers data between websites devices.

Or servers whenever you're browsing online and you type in a url and hit enter you're essentially sending an api request to google servers and what they will send.

You back in the response is the website that you're looking for so how can this be useful when building workflows on integromat like you're trying to connect to an app.

Or a service that is currently not supported in our modules you can use your own api request to connect to any online service that has an api endpoint let's take a look at a quick example.

Let's select the http module and make a request now the first thing you'll notice is that we need a url where we want to send that request to.

Connecting Your Scenario to Non-Supported Web Services

So for this example let's use the random user generator service and it's essentially a free open source api service that you can use to request randomly generated users through an api.

Request so whenever you're building your own api requests you'll probably be browsing around the documentation for that api service so that's what we'll take a look.

At here as well let's go to documentation you'll notice the different sections here we can straight uh jump straight into.

An example of requesting multiple users from this service now it tells us here that this url will give us 5000 randomly generated users so we can go ahead and copy this url and.

The setup here now we don't exactly need 5000 generated users so we can just go ahead and make a five now the next one here is the method is.

The method is essentially the type of the request that you'll be sending the most common types are get and post now get as the name suggests is when you're trying to get some data from the.

Posts Related:

    Other side and then post is when you're - Make Automate

    Trying to send some data to a different location so for most api requests you also need to set up some kind of authentication.

    But since this is just a free open source api we don't need to authenticate this request so we can skip the settings here the last thing we'll do before running.

    The request is check this bars respawns box what it does it converts the response that we get into a more readable format for other modules that you might be.

    Using in your workflow so let's go ahead and try to run this request we got a response so let's take a look we have some data here so we can expand.

    That we have five results so the five randomly generated users and we can see we have a profile with the randomly generated details.

    As well so right now let's take a look at a different example and we'll use authentication to connect to real service with real data.

    So for that let's use the airtable api now our table api is great because in the documentation that they have they'll give you examples using the real data that you have in your basis or.

    Tables so we'll be looking for the authentication section first and it's telling us here that we need an api key and that we need to use a header.

    With the authorization token so let's take a look at the at the example right here on the side the h here stands for the header and.

    Then we have authorization

    Better and then the api key of course don't show your api key to anyone we'll also notice the different sections here on the left menu.

    So we can go ahead and browse the list records action here it tells us that we need to use a get request it's again giving us examples here on.

    The right side and also telling us how to authenticate that connection so let's go ahead and copy the url here in our setup so we'll replace this one.

    And paste in the airtable api url now for the header uh it's added like this so click add header and then type in authorization.

    For the value we'll type in better and then we'll copy the api key so it's matching this format as given in this example so just go ahead and paste the api key.

    And now we have everything for that request so let's try to run it we have a response here with some data so let's expand that and check.

    We are getting some records in the response with the actual fields from that table you will also notice that we have a status code here 200 that means the.

    Request was successful we can also try what happens if we try to run this request without the authentication that we set up so let's go ahead and try to run it like.

    That the code is changed to 401 and that means the request was not successful in the response we will also see the error type.

    And it's telling us here that authentication is required that's why the request was not successful okay so this was just a short introduction into setting up api.

    Requests using our http module now we have a full detailed course on our youtube channel so if you're interested in apis be sure to check that out i hope this was useful and i'll see.

    DISCLAIMER: In this description contains affiliate links, which means that if you click on one of the product links, I'll receive a small commission. This helps support the channel and allows us to continuetomake videos like this. All Content Responsibility lies with the Channel Producer. For Download, see The Author's channel. The content of this Post was transcribed from the Channel: https://www.youtube.com/watch?v=s1NyHkgcKaw
Previous Post Next Post