The Definitive Make.com HTTP & API Masterclass

13.91k views14523 WordsCopy TextShare
Nick Saraev
GET THE BLUEPRINT HERE FOR FREE 🙏 https://gamma.app/docs/Makecom-HTTP-Module-API-Masterclass-s1ta03...
Video Transcript:
hey Nick here and in this video I'm going to show you everything you need to know about the HTTP module in make.com this is going to be the most comprehensive tutorial that you will find on this topic on the internet I'm going to cover every single field in the HTTP module I'm going to talk about how to use and structure various requests and then after some Theory we're actually going to dive deep into me practically using the HTTP module to connect to four different apis all with their own authentication methods so if you've worried or
struggled with connecting HTTP modules to various apis in the past or you guys just want to brush up on your skills then this is the video for you let's get into it so the HTTP module that I'm going to be focusing on in particular well there really going to be two the first is the make a request module which is how the vast majority of API requests in make.com are going to occur and then I'm also going to cover the make an oaf 2.0 request now you might be asking yourself Nick why are you only
covering these two and it's because I've made over million dollars with make.com up until this point and I've basically never used any of these other modules I just haven't needed to so as most of my course and training materials on make talk about I'm only really worried about the highest Roi bits I'm worried about the parts that you're going to end up using 99% of the time not all these random edge cases I do use the get a file from time to time but that's not really the the purpose of this video so uh know
that this video is not going to turn you into a web developer you're not going to walk away from this with a computer science degree unfortunately but it is the 820 if you've wanted to learn how to make HTTP requests what the hell all of that fancy stuff in like the Chrome developer tool console means um what the responses in make.com when you make an HTP request are then this is the video for you I'm also going to show you how to successfully make the vast majority of API calls that you will ever need as
I mentioned to you there are a few different types I'm going to connect to four different apis um but there are a couple different subgroups that they all fall under um and once you learn this you can basically connect anything that you want into even if there's no like native module I'm also going to be reading some API documentation alongside you um and I figure this is going to help you guys learn some of the more tacit uh knowledge sort of steps here um involved in making API request successfully because every API is a little
bit different all right so what do you need to know you could spend years going to school to learn thousands of little edge cases with apis or I could just walk you through what 99% of those HTTP requests and API calls are really going to look like in practice so here's what we're going to cover over the course of the next little bit the first is we're going to cover what is HTTP we're going to talk about how it works where it came from and basically just all the stuff that you need to know in
order to be able to to to read documentation that relies on HTTP requests the second is how do I connect with apis and what are some examples the third is what are the three main types of API requests which I'm going to be covering in detail and then the fourth is how does Jason work I get this question a lot Nick how do I learn Jason do I need to know Jason before I get deeper into make.com the truth is that you don't but if you're watching this video it's probably because you're already a certain
skill level and Jason is just the natural next step for you so we're going to be talking about that the last thing is can you show me how to connect to apis and I'm actually going to be walking through three to four of those connections just so that you can pattern match so you can see what I'm doing you be like okay he keeps on clicking that field that field must be important right all right so let's get into it and let me just zoom this out a little bit um I'm going to make this
video 4K so you guys are going to be able to see how the text let's talk a little bit about HTTP requests HTTP stands for the hyp text transfer protocol and I know that when you see four-letter acronyms and the internet freaking loves four-letter acronyms for some reason but when you see these you know immediately a lot of alarm bells are probably going off in your head like a that's computer nerd stuff how the hell am I supposed to understand this I just want to make some money well it's okay uh Nick is here uh
when they say protocol Protocols are just an established way of doing things to send an HTTP request just means that you are formatting a bunch of text in a very particular way that some dude invented back in 1989 I think it was Tim Po I I might be mistaken um but somebody invented this back in 1989 and then because the internet is so iterative because everything Builds on itself right after he invented this HTTP um framework you know a bunch of people voted on a bunch of people shook hands and it's basically just been what
we've been stuck with ever since so if you want to send a request to a web server you basically need to know how to structure it and package it in the HTTP way right using the hypertext transfer protocol so the structure itself includes a few key components and I'm not going to run through every component but these are the four ones that you actually need to know the first one is called the URL now if you ever wondered what a URL stood for it stands for Universal resource locator and that's it so if I were
to go back into make here and then if I were to open up a module let me just delete everything here and make this uh like from scratch um this URL module or this URL field over here rather um that's that's referring to the universal res Source locator luckily all of us already know what that is um URL is just a web address so google.com that's a URL left click. that's my website that's a URL amazon.com these are all Universal resource locators as the name sort of points to this is just meant to be like
a way to locate any resource on the internet and to do it universally right so that's number one the second thing is called a method and if we go back to our HTTP module here um you'll see that there is a method field and by the way if you're unfamiliar anything in make.com where the text is bolded like this that's a required field meaning you have to select a method you have to select a URL basically in order to click okay and have this work if I remove this it's going to tell me that the
value must not be empty so these are required pieces of information um the method field here is broken into a bunch of different options and these were really intimidating to me when I first started out but the good news is you're not actually going to need the vast majority of options on this screen after several years of working with make.com and several more years of just making HTT T your request on the internet outside of make.com here are the only ones that I actually use I only ever use get which is sort of like one
of the first ways to request information on the internet to access a resource sort of the old way uh post which I like to think of is just a modern get request but it's also a way that you can like add data to an API or resource or update a database and then put and put is basically like I talked about updating um some apis um split adding resources and updating resources into two different methods and so post would be an adding a resource and put would be like updating a resource um this doesn't really
make any sense in theory so you know if I were to discuss this practically let's say you had a um I don't know like a like a clickup uh CRM and you had a bunch of leads in the CRM with email addresses first names and last names when you call the clickup API like when you send a request to the clickup module what you're really doing is you're sending a post request with a bunch of fields in it that basically say hey I want to add a new record or hey I want to delete a
record when you send a put request what you're doing is you're basically providing the ID of a specific record you're saying hey I want to update this I want to change this I don't actually know if clickup uses put but uh you know that's more or less how that works so those are the only three that you actually really need to know and in practice you know I've as I've said I've made well over a million dollars with make.com at this point I actually have to like sit back and add it up it's probably over
a million and a half now maybe even two million um these are the only ones that I ever use and they're probably the only ones that you're ever going to use to okay so that's URL that's method let's talk a little bit about headers headers are just structured key value pairs that most servers look for what is a key value pair well if I open up this header Zan if I just click add a new record you'll see that it asks for two Fields one called name and in make.com a name is just a just
a key and then the second is a value so if I were to say ID equals = 30 fe8 presumably this is the ID or identifier of some resource that I'm calling you know like a clickup record or maybe a row in my Google sheet or something like that um what I've done here is I've basically added a structured key value pair to the header now the headers somebody just you know as I mentioned this guy Tim or whoever it was that invented this back in 1989 um they basically just said hey uh we just
have some format here where you know at the beginning of the request we need to add a bunch of headers because maybe we want the headers to be standardized maybe they were thinking a little bit about like cookies you know 10 or 15 years from now they were just thinking about like all the information they could put in here and how if they standardized it it'd be much easier for people to send and receive requests um and that's really the name of the game here the internet is very standardized now including HTTP requests which is
why you have these conventions so uh realistically headers are stuff nowadays like this user agent Mozilla 5.0 uh there's like a standard header called the user agent which just typically tells a website hey what am I using to browse this uh there's uh like I think there's like uh a dimensions of the browser it like tells them how big the browser is for instance you can imagine how this information might be useful to the server because one it'll help them track you and develop evil Cookie monitoring ad services blahaha but second and probably more importantly
is they'll actually be able to like cater the content to people at either that specific screen size or people that are using that specific browser or what have you the header that really matters for us today is going to be the authorization header and the authorization header is just a standard it's a convention that a lot of apis use to send uh and receive requests using an API key and the authorization header just looks like this you literally just the key is called authorization with a capital A and then the value is always the word
Bearer plus a space and then you know API key goes here so pretend I had a big API key like this what I would do is I would write authorization in the key and then I would write Bearer and then i' a space just like this with capital B and everything and then I just paste in my API key and I'll actually connect to several apis using this exact method in a few minutes so you can add basically an infinite number of headers um and as I mentioned there a bunch of templated headers there's like
uh like cookie for instance there a bunch of different types of cookies um so just keep that in mind header is just a way to structure that information okay and then the last sort of way or or main component in an HTTP request is called a request content or the request body and the request content is just this section down over here we see it as request content you know how earlier we had let's just say ID and let's just do this if this were in our header for instance um you could Al or or
uh let me let me actually do the authorization example what you'll find and what I'll talk about in a minute is that some apis like when the API key is formatted like this but other apis actually prefer the API key to be formatted like this and this format here is called Json Json is still split into key value pairs it's just written uh in this specific format that I've showed you with curly braces and quotes and keys wrapped in this uh in these quotes with colons and between them and then you know some closing curly
brace so I'll get into the specifics of these formatting pieces in a moment but for now just know that again this is just a protocol that we agreed on forever ago before I was born that's for sure um and ever since then the internet and really the World At Large has just been using this convention to send and receive standardized info so as I mentioned down here there are a couple of finer points but I never really use them and if you're building an automation business that actually makes money you probably won't either uh you're
just going to use those two modules that I showed you early the make a request module 95% of the time and then the make an ooth 2 request module the other 5% of the time so that's what we'll cover and then I'll actually give you some practical examples with the HTTP modules in a moment but first I want to talk a little bit about API okay and how you can turn this module basically into any other module you want like this HTTP makeer request module if you format it right it will be functionally equivalent to
this canva created design module it's just instead of make and canva having done the heavy lifting for you you're actually going to build out that connection yourself all right in terms of apis we have a very fancy diagram over here which I definitely did not just search up the word API diagram on Google Images and then just copy the first result that would be bad uh but we have a laptop over here which is U and then it sends a request to an API which is connected to a server you can just think of these
as one for Simplicity and then the server in the API they'll send a response back and that response will be formatted a particular way it'll go back into your computer and then voila you'll get some data now because we're using make.com which is a cloud service our diagram doesn't actually look like that our diagram instead of the U the U is like make.com so excuse me any request that you're sending you're not sending from yourself you're sending it from make.com and that's important distinction so what does an API actually stand for API stands for application
programming interface and uh to be honest I think it's just one of the dumbest names anybody could have ever used to uh you know encapsulate this this this idea the whole idea essentially is that this is an interface uh your the internals of the API process and your server are a black box so you can only like access it through the interface but I I just think that it's really silly and I just hate how the internet and computer scientists at large have just turned everything into three or fourl acronyms which don't really provide a
lot of uh convenience for people that are learning this for the first time that's okay this basically just refers to a server that you'll send something to to receive something else what you'll send as we show here is the request and what you receive is the response so people always talk about HTTP requests what was the response body what was all that stuff that's basically it when it's a request it's what you're sending when it's a response it's what they're sending back to you now apis are kind of like you know user accounts they're kind
of like uh they require a password essentially and the password to access an API is typically just referred to as the API key so this is a password that allows you to access your specific account and because it's a password you you typically have to be quite careful with those things you don't want to like expose your API key and you don't want to show it to everybody because a lot of the time apis are connected to the pricing of some software service so uh you know maybe you only have 100 API per month on
the $5 plan and then if you go past that now you're paying 50 bucks well if you expose your API key and there's some douchebag out there on the internet as there always is uh who you know copies it and uses it to make his own requests well now you know you're sort of going to be up creek without a paddle as I believe they uh they say but that's all Theory let's actually make things practical why don't I actually show you what this might look like in reality well I have a service here that
I talk about pretty often um called any mail finder and I love these guys because they uh you know I've been using them basically non-stop like literally once a day probably for the last godamn four or five months something like that um they're really cost effective like email enrichment service if you're UNF familiar with email enrichment basically U they will try and find an email address for you at a specific domain or something so this is what the interface looks like and basically the way that it works is you know if you're using the user
interface if you're using like the the typical the graphic user interface the GUI if you wanted to find a um person at a domain you just Supply the domain and then you'd Supply their full name so Nick at left click. and what you see is it just created a little new row and it says hey we found an email at left click. Nick left click. which actually turns out to be my email um which you will not do bad things with and then uh you know this is basically like the the workflow right but accessing
this GUI is super annoying like it just sucks to have to go in here every time what if you had 10,000 domains that you really quickly wanted to check the full names um and email addresses of what are you going to do sit here like a monkey and just copy and paste them in for hours no obviously not and that's where apis come in handy and so any maale finder has an API where you're supplying an API key and you can use that API key to make requests to the any mail finder API um and
so what I'm going to be showing you guys later is I will literally copy this API key which is like my password but it's not a big deal because I can rotate it right after this video that means I can just switch it um but I can I can use that API key in a request to basically supply all of the same information I just supplied here there'll be a field for left click. my domain name there'll be a field for my full name there'll be a domain for whether it's a person search a decision
maker search a company search right I could supply all of that information just using Json instead of you know what I'm doing here and then it'll go and it'll it'll do it for me it'll do the thing and and you know return a result so that's more or less it we're going to send an HTTP request to any mail finders API their server is going to do some fun magic I don't know what sort of like black Wizardry they're doing down there but uh you know you'll receive a response with the enriched email most platforms
that you've probably used up until now inm make.com will have built-in API connections like for instance let's say I wanted to use this canva module here right the genon asset so essentially what canva has done is they have gone to their API and then they've written all the code to call a specific part of their API and then they've just packaged it into a module here for us to access and so now we don't actually have to do all the heavy lifting in order to to do it um all we have to do is just
drag and drop a module and then go over here and then click create a connection where we just have an one little login screen and then we're good they're still using apis that's exactly what they're doing um but what we're going to do now is we're assuming that the service that you want to connect to doesn't have an API so you sort of have to do it yourself that's why knowing this is so powerful it more or less lets you create your own modules anytime that you want and I I consider it a requirement really
if you want to scale up um your make.com just in general your automation workflows okay we got a little bit more Theory here and then we're going to dive into the Practical bit there are three main types of API requests now I'm saying because the internet is made by people and people are very opinionated and usually people will agree on something and then somebody later will come by and say why the hell are they doing it like that that sounds dumb I'm going to invent my own thing essentially because everybody has their own opinions about
the best way to do things several conventions have Arisen um around how API requests should be formatted where you should put the API key uh what's the most secure method of going about it and how do you balance that security against the ease of use and integratability and and all that stuff so there are actually hundreds if not thousands of different ways that you know some random API over there is going to format it that way and this other API is going to format it the other way uh but in practice I find that they
all fall they all fall into three main categories three main umbrellas the first is that you'll put your API keys in a header the second is that you'll put your API keys in the request content and the third and this is the hardest one for many people to understand and this is a question I get in my community all the time is you'll connect via ooth to which I'll cover uh later and I'm going to show you examples of each there's really no fundamental difference just a few minor changes to the steps of the AP
request but before I do that just to show you what this means in practice we've actually already gone through this this module right we've seen the URL the meth method the um headers and then the request content so the first way is you just put your API keys in a header so just as I mentioned here with the authorization Bearer uh you just do something like this and sometimes it's authorization bear sometimes it's X API key and then you you remove the bear part sometimes it's like the service itself I think a phantom Buster is
like this for instance um and I'm going to use their API call later but essentially you just put them in the header the second main way is you put it in the request content and so you actually have something like this that says API key you write it just like this and then you send it in a post request specifically you can't do a get request has to be a post uh and I'll show you an example of that later and then the third is you forgo this module entirely and then instead use a module
called the make an O 2.0 request where you actually have to manually create a connection by essentially doing a little bit more complicated of an authentication flow where you have to get a client ID a client secret an authorize Ur a token URI a bunch of more or less uh it's a lot more secure for sure but um you know for people that are just getting started it just seems a lot more complex regardless it's all right it's really not that hard and I'm going to show you how to do um I'm going to show
you how to do it in a moment the last thing that we need to do in order to really deeply understand HTTP requests and then how to make API calls is we need to understand Json Json stands for JavaScript object notation JavaScript is a programming language primarily used on the internet JavaScript objects are part particular ways of writing information that are wrapped in these little curly braces so JavaScript object notation is basically where regardless of whether or not we're using JavaScript JavaScript we're writing uh about a resource just using that very specific convention with a
very specific protocol very specific language so just like HTTP some people shook hands uh you know what's that 25 years ago and said 35 years ago and said this is how uh you know we're going to format our requests JavaScript was sort of a collab effort where a bunch of people said okay this is how we're going to do the format with the curly braces and the quotes and all that stuff JavaScript object notation really is nothing scary if you just stare at it for 10 minutes you will get it and you'll be able to
deal with so many more possibilities and opportunities and make the issue is most people just don't get it explained to them in this way and so they always think of Jason as this very intimidating sort of like black box where you know you have to ask gp4 for or something like that historically getting right was a pain in the ass um because you know you'd spend 30 seconds you know looking at an example Jason request and then you'd format it the same way and you'd send it and then it would say error you know 400
requests invalid data whatever you'd be like what the hell's going on you'd stare at it line by line and then finally you'd realize that you forgot a little square bracket or curly bracket or something but nowadays if that ever happens to you you can just get AI to fix it in like two seconds you just copy and paste your Jason you send it to Ai and you say hey can you fix this Jason what's wrong with it and it'll expl explain it to you so what we're going to do next is we're just going to
stare at the below examples and I'm going to walk you through basically how Json Works um not entirely but in a high Roi way again I'm going to do the 8020 I'm going to cut out all the stuff that doesn't super import like extremely matter so uh first things first what is this over here in the top left hand corner well this is probably the simplest Json structure you could possibly have notice how we have a left curly bracket that starts the object then we have a quote and then we have a key which I'm
calling username then we have another quote so from there you could see that the keys are wrapped in quotes then we have a colon that's very important and then we have the value and in this case the value is also wrapped in quotes and then when you want to finish your object you just have to make sure that the number of open curly braces and the number of closed curly braces match so this here is an object you could imagine how this object might refer to a character in a video game maybe my username is
King Nick right and I'm going to carry that example forward with you through a few more of these essentially all you need to know is that you're going to have some quoted thing on the left hand side and that's going to be your key and then you're going to have something on the right hand side this thing doesn't need to be quoted which I'll get to in a second and then between them you're just going to have a colon these are your key value pairs let's look at another example example here this is a more
complex example but um this is probably at the level where most of the API requests that you are formatting sending and receiving will be so in this example we have the exact same thing that we had before it's just instead of closing our Json with another curly brace what we've done is we've extended it and we've added multiple options and the way that you add multiple options in Jason is you just add a little comma here right so I have a little comma right after username King neck and that just is a convention that says
hey this is going to be more than one we're going to add multiple anytime you want to add another you just add another comma so now in addition to username King neck we also have a level key and that level key has a little colon behind it the value of that level key is 42 now I've wrapped this 42 in quotes but you don't actually have to wrap numbers in quotes some apis want numbers formatted with quotes and then other apis for whatever reason do not want numbers formatted with quotes this is a computer science
principle essentially called type uh type casting or something like that make will typ cast everything essentially to a string most of the time or it'll try and intelligently typ cast it for you so for most instances you don't need to know specifically what type of variable it is um but in some you may so if you ever have some error where you try and call a video game API and feed them in username KCK with level 42 and it says you know in uh improperly formatted Jason just think to yourself hm okay maybe it's the
number maybe I'll just take the quotes off try again odds are it's going to work okay and then down here we have a relatively big deviation from what we've done so far which is instead of having keys and values just both wrapped in quotes now we have another key called skills and a colon but the value this time isn't just a string the value this time is an array and arrays in Json start with a square bracket then end with a square bracket on the right hand side and so arrays are just basically like a
list of different values separated by commas and if you've worked with arrays in make.com before you sort of instinctively understand how this will work um just make sure to wrap every string in these quotes here and then you could have as many as you want so in my case this is an object here that describes a username of King neck a level of 42 and then an array of skills that includes walking and running my video game character is very boring so I mentioned that skills is an array you have multiple values wrapped in square
brackets play around with us there are a bunch of websites out there that allow you to format Json however you want you know you could add another comma here and then say sword play or something like that you could add another comma here and hypothetically you could say 39 right whether that's a skill or not I don't know but again we're just making up at this point um the point I'm making is you have multiple different data types buried within an array so in reality the thing above the second you start adding more like complicated
data types like arrays and and stuff like that um it gets pretty hard to read so most people will just indent it and they have a very specific way to indent it where basically every time there's a curly bracket you will do a tab um to the right after and then you're basically going to have a small little space so let me show you a more complicated Json structure that includes everything that we've talked about so far just with one additional layer of complexity so we have this opening curly bra bracket but then instead of
jumping right into the username what we've done is we've added a key called user and then we've added a colon and then check this out we've actually embedded another JavaScript object inside of the value of that user key and this is really the final piece to the puzzle this allows Jason to become arbitrarily complex because now you can Nest multiple objects within key value Pairs and you could have a key with an object as a value with a bunch of keys that have their own objects as values and in this way you can get like
20 layers deep I'll be frank though apis that typically do get you 20 layers deep are typically shitty apis there's usually no need for the data to be like that crazy deep and nested essentially um so some of the times it's just something that you have to deal with uh personally the the best apis that I find the easiest ones to use they go maybe like one two three layers deep at most the good news is all of this is easily understood by make.com because there are modules that parse this automatically that turn this into
variables that you can just access with you know dragging and dropping a module like we normally do so uh we have a user key and then inside we have another object here and if you think about it this object starts with this this curly bracket and then ends with this curly bracket right because we have to have the number of Open brackets uh equal to the number of closed brackets and this is the next successive curly bracket so this whole object here starts here then inside of it we have a user key with another object
here and inside of that user key we have a key called ID with King Nick level which is now just a number 42 and then again we have an array of skills which are walking and running and as I mentioned down here you can Nest infinitely okay so that's the 8020 with Jason to be honest I think that that's all you're really going to need in order to get out there and start practically understanding what is Jason when you know you send a request and then you receive uh a response from a server let's actually
take this information out now and let's actually go connect to some apis let me show you how to do all of this Theory uh but in practice so the first API I'm going to connect to is called any mail finder as I've shown you guys previously you can easily enrich or find an email using the GUI just going to exit out a full screen here so I can bounce around a little bit easier what I have over here is of an HTTP and API playground what I'm going to do is I'm just going to rename
this and I'll just call this any mail finder this just going to be like our test module then every time I connect to another API I'm just going to create a new module then we're just going to run them all independently okay so I want to connect to any mail finder well what do I need to do uh the thing that most of these websites tab is they'll Supply you some type of API documentation and so anytime you want to connect to the API of a service typically what I do is I just type nil
finder API I'll just add the word API at the end of the service and here we have the email finder API documentation for any mail finder and this is basically what all API documentation is going to look like because they have a couple of custom um sorry not custom templated like libraries that make API documentation so usually on the left hand side you'll have like some sort of table of contents and then the middle here you'll have a bunch of data and on the right hand side if it's a good API they'll actually give you
some examples of the way to format the requests and receive the responses so here we have the Emil finder API what I'll always do when I access one of these apis is I'll very quickly read to see um what the authentication looks like so I'm scrolling through here okay they talk about rate limits our API does not have rate limits that's awesome rate limit just means if you send too many requests um eventually they will just cap it out and they'll say sorry you can only send 10 all right so now we're already getting to
the juicy part is the authentication so all requests require authentication to authenticate you'll need to set an authorization header with the API key you find in your your settings as a value for example if your API key is secretor key1 23 you will want to add an authorization header with the value Bearer space secretor key1 23 if you guys remember this is the first way to authenticate that I showed you guys earlier you basically need to put a header and that header needs to have the key authorization and the value bear space whatever your API
key is so that's awesome very convenient and I most definitely did not plan this so first thing that we have to do is we have to go to our your settings as value so I'm going to open up a new tab and you see we have an API key over here which is awesome so I'm going to copy this API key I'm going to go back to make.com open up an any mailer Tab and then all I'm going to do for now is I'm going to add this authorization header this is going to be the
format of our API request I'm going to click okay for now because we haven't learned anything more about this API um we want to see how to send a request and basically enrich an email I'm just exit out of that okay great now it's time for us to basically figure out what exactly we want to do right and what I want to do is I want to send a company domain like I did earlier left click. and I want to send a full name and I want to have uh I want it to return me
the results I want it to say Nick left click. a just like this example gave us back over here the way that we do this is usually on the left hand side they'll be um as I mentioned a table of contents but these table of contents will all be different endpoints an endpoint is just a universal resource locator that's specific to a function so one function might be search for an email well that'll be a universal resource locator that points somewhere else search for all emails on a domain that'll be a different Universal resource locator
so I'm going to click on search for an email and you see it's going to go all all the way down here and it's going to say use our post v5.0 Searchers Json endpoint to find an individual's email well that's great but what the hell does that mean anytime you see a slash and then you see um an ending like this this is referred to as a relative Universal resource locator a relative URL it means that you need to figure out what the base URL is now fortunately in this case they're nice enough to provide
us an explicit example of what their root URL is which in this case is api. nilf finder.com this is the root here and then the V5 o and stuff that's just everything that comes after but in some instances uh you won't be able to and I find in practice most apis are like name of thee thing.com AI or they're api. nameof thee thing.com so that's your root but as you see it's as easy as this they actually provide us an example request content or request body to send and what I'm going to is I'm literally
just going to copy all of this Json and I'm just going to replace it with my own and if I'm honest that's 99% of what my job is I just find an example request then I go in and I replace it with the data from the client or the data that I want in my business so uh we're getting three pieces of information here we're getting the method which is post we're getting the universal resource locator and then we're getting the request content we've already mucked around with the header but if you think back to
my earlier slide um those are the four pieces of information that you need the header the universal resource locator the method and then the request content everything else is templated everything else is just going to be the same basically every time so actually go ahead and let's do this just going to drag these two tabs so they're really close together I'm going to open up this email finder module and I'm just going to paste in the URL remember that it said post so I'm going to click method I'll go to post I already have my
header here with the authorization and the bearer and there are a couple of additional Fields here that may look a little bit different to you um I always just do this I mean if I go back here and I pretend that all this is empty and I've never I haven't filled out anything I always do this go to raw and then content type just go to application Json this works more than 99% of the time um the vast majority of apis are formatted in this way the last thing we need to do is change the
request content so I'm going to go back to my API documentation here and then I'm going to copy this because this is the request content and we know enough Json now for this to be very clear and by the way I just pasted this in command V or uh control V on Windows and then as you see it has a bunch of weird spacing the reason why is because it's not taking the new lines in it's just taking in the tabs so if you wanted to preserve spacing quick little hack is to right click and
then press paste and match style that'll basically all the time um just just match it to whatever it was in the example okay and then what I want to do is if you think about it I'm looking for a specific person at a specific domain so in my case I'm going to type in left click. and the person's full name is going to be Nick sarv I'm going to click parse response is yes and that's it that's all you need in order to essentially create this API connection to a service that doesn't have um like
a built-in service or built-in integration with make.com this show advance settings down here I don't use any of this so don't worry about it I never use the username the password the timeout share cookies with HTP module self sign certificate reject connections I've worked with probably several hundred apis at this point and I haven't needed to do this so odds are unless you're working with a very Legacy API or something that's just super non-standard you're probably not going to need to do that as well um if there ends up being a demand for it I'll
make some videos on this but I'm not going to now simply because it's very very very rarely required or relevant and even when it is there's usually ways that you don't actually have to do this you could just go back to using something like bear authorization like I did above okay great so we've set everything up it's now time for the Moment of Truth what I'm going to do is I'm going to right click on this module and click run this module only this is functionally equivalent to clicking run once if you're curious um I
just like doing it this way and we're going to see what it says so we just made a request status code was 200 when you receive a 200 status request that typically tells you that everything was okay as you see if you guys remember I talked about there being an HTTP request and I also talked about there being an HTTP response so this is the response right here and you see the response also includes headers so the response has a header called Date which stores the exact date the request is made has one called content
type application Json right it has one called content length it has a bunch more I'm not going to dive into every single one but suffice to say that these are just standard ways that apis communicate with each other and they standard pieces of information that allow um people like you integrators to just have a little bit more metad a little bit more context to do cool stuff with hypothetically maybe you wanted to know that the um API was powered by Express Express is just a library or like yeah like a server library that allows you
to run one of these apis yourself um now you know so that's headers if we go down to cookie headers you'll see that that's empty sometimes this just stores information that's like hypers specific to you the user now the thing that we really want here is this data collection and this data collection like uh when you make an HTTP request to a resource and it returns a positive result you'll always have something in this data collection so you're always going to have to go into the data collection in order to get something and you'll notice
that there are two different um collections here or objects the first is called input and the second is called results so input is just any mail finder the specific API is providing you the same thing that you provided it just in case you need it and so this is the API just being nice and saying hey maybe you're going to need this domain name later hey maybe you're going to need this full name later I don't know obviously we don't because we have that information previously but maybe you're sending this information from one scenario and
then you're retrieving it from another scenario or something like that these conveniences are afforded To Us by apis to make our lives a little bit easier all right and then the thing that we're really looking for at least in the specific API right although all of your results will be in data um different apis have different conventions for whether it's called input results whatever right these are all variables that they came up with but inside of this specific API the results collection has an email Nick at left click. and then a validation which is valid
as well as some Alternatives which in this case are empty you'll also see there's a success uh key value pair and the value there is true so this gives you a ton of information and a ton of possibilities right you could feed this into a flow that is different things based off whether the success is true the success is false the success is true maybe it takes this email address and it sends him an email or adds them to some different campaign or something like that if it's false maybe it goes through some other validation
method or maybe it tries to call their website to scrape a specific little snippet or something like that right a lot of options here uh but essentially that's how you do one of the most basic types of API requests all right but one rep is not enough to grow giant freaking biceps so what we're going to do is we're going to do this a few more times for different apis we just did this with any maale finder why don't I exit out of there and then why don't we also do this with Phantom Buster so
I'm gonna open up Phantom Buster excuse me I actually already have Phantom Buster open over here good Lord so um Phantom buster if you're unfamiliar with how Phantom Buster works is what it is is it's like a scraping platform which allows you to uh basically scrape things like LinkedIn leads allows you to run scrapers I think for Instagram as well if I go to dashboard here and then I say browse Phantoms you'll see there's just a variety of different things you could do scrape leads from LinkedIn company post connect with profiles on LinkedIn search um
you could AI LinkedIn message writer do DMS Google Maps search right this is basically just a big scraping platform and hypothetically you know I talk a lot about this platform in my community because it helps us get leads that we then do email Outreach to but hypothetically let's say you wanted to interact with this API um you know through make.com you didn't want to have to do it manually you wanted to do it all automatically well what I'm going to do as I did before is I'm going to go to Phantom Buster I'm going to
type in API you'll see that the first result is phantombuster API let's give that a click says you can programmatically control your Phantom Buster account and then there's also an API reference right over here so I'm just going to open that in a new tab let's just see what this looks like ah great as we saw with the nil finder API it's organized in a very similar way you have three columns you have the end points on the left then you have a description about them in the middle then on the right you have like
actual examples of what this looks like and this is a little bit more complex but the good news is I'm going to be able to walk you through some some different libraries that you could use um and and ways to get the information that you need so um they misspelled that losers no I'm just kidding if we scroll down here you'll see if there there's a bunch of information but again the one that's the most important for us is this one here authentication or request format because this is what's going to um basically allow us
to connect to the API it's basically going to allow us to like sign into our specific account right so these guys are great because they actually provide you like a whole breakdown like a little GIF of how to access the API key and they even provide you a link for convenience where they say your API resides in your workspace settings page so if we just open this in a new tab as you see down over here third party AP key I can click add API key and this is the one over here that I want
so I'm just going to oh they even have a little copy button I'm going to copy my API key here I'll just go back and I'll see what else they say about it how do we actually authenticate again they're saying protect your API key this is good uh good convention in my case I'm going to delete all my API keys after this video but don't go sharing this if you don't have to all right now we get to the good parts the authentication part how exactly do we connect with this API well let's see authentication
is dead simple put your API key in the x- phantombuster D ke-1 HTTP header you can also put it in the key query string parameter of every request that you make fantastic now it looks like this is an API that actually gives us multiple ways to authenticate we're going to use this one because this one's easier but you can also authenticate using query strings which are interesting as well and I'll cover that briefly so that's fantastic this is exactly what we want we just feed in this x- phantombuster D key so why don't I go
back here to my new module and I'm just going to rename this and call this phantombuster and let's just make this the trigger and why don't I go over here and then change this uh header structure so remember before it was authorization and the value is be space whatever the API key is let me just refresh my memory here it's x- phantombuster D ke-1 so instead of authorization it's this and then we just paste the API key in again people make API keys because they want you to use them so they're going to tell you
how to do so at some point the unfortunate thing is some apis are just written quite poorly and some of them are nowhere near as straightforward and simple as otherwise okay I'll cover how to do query parameters in a moment but let's actually figure out what we want to do like the Endo that we want to specifically run so why don't I go back here and let me see what I got here there are a bunch of different things we could do as you see they're organized into like branches there's the orgs branch which is
just um SL orgs there's containers SL containers there's slash branches SL agents SL script SLC capture SL AI oh that's interesting huh I didn't even know that we could use this for um AI calls very very cool org storage right all this stuff's pretty neat um I think what I'm going to do is I'm just going to export the agent usage because that seems the simplest to me and then we're just going to get some data that tells us I guess when the last time is that we used one of these Phantoms just going to
give us some information so that seems pretty straightforward let's do that oh and then um it looks like the quer parameters we feed in is the how many excuse me how many days of data to export the number of days should not exceed 6 months all right so let's see what we can do here and let me show you exactly how I would do this if I were to go out and um like create this API request we already have the authentication part granted we haven't tested it yet but we are going to test it
here as you see phantombuster actually allows you to to try and test um stuff with the API key over here so what I would do is before I even do the API request I'd actually copy this and then I paste all of this stuff in and then I just click try it to see what sort of data I could realistically look at okay so it's saying you should have a required property called number of days so I'm missing something basically I'm missing um yeah it looks like I'm missing the days parameter and that's because I
need to fill this in here okay so let's say I want to feed in 30 days right over here let's click try it all right so now it gave me a response looks like the response was not Jason interestingly enough it's a CSV but that's okay um and that tells me that all of the information here is right I just need down to format it in my own make.com scenario in order to make it work so that's great um I have everything that I need right over here in this curl request curl is just like
an old again it's another convention it's another way to make a request that you used to do in the terminal so you used to literally go into your terminal and you write curl like this you type in the website you press enter and then you just get all of the website data you get the HTML the website specifically so I could just copy all of this here and then I could paste this all in here and I'm getting a too many requests because it looks like I've just made like three or four requests in a
second um that's okay um but essentially this is just a way to do the same thing that we did earlier um just in in our terminal okay I think the reason why is because I have a bunch of these weird little dashes here so I just need to remove these dashes oops okay yeah no I guess it's just uh throttling me because I'm I'm sending too many requests in Too Short a time um that said keep in mind I mentioned how the previous API did not have an API like rate limit um a lot of
apis do so when you start sending too many requests too quickly or whatever they'll throttle you which is unfortunate um but that's okay it's not the end of the world what we're going to do instead is we're going to take this information we're going to put it in a make scenario instead so um the way that I do is I'll actually usually look for like a curl request example because it has everything that I need if you think about it has the URL right here the universal resource locator so all I do is I go
all the way over here and this is sort of cheating and I'll tell you why in a second so we're going to leave the Phantom Buster key the method as we saw it's get it's not post the URL is over here and you'll notice that this URL has a days parameter equal to 30 now this is technically called a query string parameter query strings are the exact same thing as the request content it's just there for get requests instead of post requests let me give you an example you see this here which is Json which
has a key called days and a value called 30 well this is functionally equivalent to what I wrote back over here this days occurs after this question mark and it's equal to 30 you don't actually have to memorize the formatting of this you could just go to query string and you could just do this and that would be the same thing if you remember um they mentioned that you could authenticate using query parameters as well well you could actually just feed in the term key here because that's what the API said and then you could
feed in the API key here so if you didn't want to use the API key in the header you could also use it down here sometimes apis give you three or four ways to do the same thing just because people have different conventions how they like to do it um I personally just always like to use the one in the header but that's my own convention right okay so uh time for the the moment of truth let's give this API request a call I'm wondering if we're going to be throttled if we are I'm just
going to try a different API key see what happens yeah so it looks like we were throttled which is interesting so I'm going to go back over here and then I'm going to try doing a different API key copy that sometimes changing your API key allows you to do more requests no it doesn't look like we we could there um it could be that this endpoint here just has a much lower rate limit so why don't we try this other one here export container usage so why don't I instead of calling that previous Universal resource
locator I'm just going to copy this other resource locator go back here and then paste this in we'll have a days parameter equal to 30 as well and okay so that one worked so it must just be that the other um URL endpoint has a much lower rate limit that's all right you're going to find weird quirks of apis like this now and again but as you see this is the same structure that we're used to there's headers there's cookie headers and then there's data now instead of data being Json it looks like this API
returns this specific data as a CSV CSV just stands for comma separated value where you basically have like tabular data this is something you could import into a Google sheet pretty easily ID URL agent name right and then you actually start having like the the values themselves um that's okay uh I'm not going to talk about like what you would do with this data because that's beyond the purpose of this video but just know that we successfully excuse me authenticated to this Phantom buster API and we did something pretty cool with it and you know
that's sort of the second way um that you can communicate with apis or authenticate with them that's still in the header mind you okay let's go on to a third example here instead of this why don't we do what was my next example instantly just because I personally use instantly all the time figured I'd give you guys a practical example how that works okay so what do we want to do with instantly um we just want to go to a campaign here and then we just want to add a lead to a campaign so I
have a campaign here us creative agencies with personalization instantly it's cold email software if you're INF familiar and all I want to do is I just want to add a lead to that campaign that sounds pretty fun so uh in order to do this what am I going to do I'm going to type in instantly API and then I'm going to find the instantly API documentation which is right over here and then I love how clear this API is it literally explicitly tells you what your API key is fantastic so you need to be on
the hypergrowth plan or above to be able to access the API key now that I'm thinking about it I don't know if I'm on the hypergrowth plan with this account all right so I was actually using the wrong account but I'm using the right one now so essentially what we have to do is let's go back to this API documentation it says finding your API key the first step to using instantly is to find your API key the API key helps authenticate your incoming requests and is unique per instantly workspace to get your API key
go to instantly dashboard settings integration API or go right over down here so I'm just going to copy this link address I love when they provided for us I'm going to paste this in okay great and what we have to do is we have to go down here to instantly API and then I'm just going to copy this API key and now I'm going to go down and you'll see that these guys along with having the same structure right with the um table of contents on the left hand side and the text in the middle
and then like some examples on the right they say once you have your API key send a get request to ensure everything is ready very very cool they have an endpoint called authenticate which we could just use to test so so in order to do so all we have to do is pass the API key looks like in the query string itself isn't that interesting and they provide us an example that we can basically copy and paste to give this a go so why don't I just do that why don't I show you guys how
to do one of these testing flows so I'm going to move this over here this is now going to be the trigger for my whole scenario and then what do I want to do I um let me just double check here so what do we get we get we get it's a get request this is the universal resource locator over here this is the API key over here so why don't we just uh give this a go I will just paste in my API key and then I'm just going to paste in this too just
to show you guys that these are functionally equivalent I could have used a key called um API key and then I could have pasted that down over here but to be honest it's functional equivalent to just writing it like this so that's what I'm going to do okay let's give this a run let's see what happens all right so we received a 200 status code and it gives us our workspace name looks like this is instantly api's testing function and it looks like we passed with flying colors they have some rate limits down here 10
requests per second that seems pretty fine to me and then what what did I really want to do I wanted to I think add a lead to a campaign right so let's see here I go to campaign add leads to a campaign yeah so this is what I want to do this is probably a little bit more realistic of a function so let's go for it now you'll notice that although the test function was a get to actually use the API it looks like you need to use post so there's a little bit of a
difference there and there's also a ton of data here that we feed in basically which is a lot more complex than anything else that we had to do before notice that the way that we're feeding this in two is using the request content it's not using the um query string it's not using anything else we're actually using the request content which is that big Json thing so I'm going to show you exactly how I would do this if I were tasked with this either for my own business or for somebody else I'd quickly make note
the URL Universal resource locators right over here then I'd look at the request type which would the method would be post i' look at this big object and I think man that's a huge ass object what the heck is this object about and then I'd be like oh right you know what it's Json because it's Json that's probably going to be request content so uh I'm going to copy all of these over one by one so I'll start with this I'll go back over here zoom in give it a click paste okay oh you know
what I should keep my API key uh all right hold on paste this and then I'm going to steal my API key out of there put that there just for now it's a little placeholder I'm going to change the method to post I'm going to go back here what else do we got then we have the data raw notice how we have an API key campaign ID skip ifin workspace skip ifin campaign all these different parameters what I'm going to do is I'm actually going to copy let's just copy this whole thing it'll be a
little bit easier I'm going go down here I'm just going to paste it all in oops let's paste it in nice like this then all I want is remember we talked about Jason earlier right so all I really want is this Json so I'm me delete this I'm going to take this API key copy that and I'm going to put it where it says API key then there's a campaign ID now I already know what the campaign ID is but usually the ID of something on an app or resource like this is almost always going
to be in the URL so if you zoom in up at the very top of this you'll see that I have some long winded campaign ID with a bunch of these random letters and numbers if I just copy that in go back here then paste it you see that it fits basically exactly and then I have an object called leads and it looks like or H sorry have a a key called leads with a value and that value is a big array so I'm just going to make this a little bit bigger here so y'all
can see but it looks like we have two objects buried within that array so I don't actually need two objects I only need one object I'm just want to test this with a single email so I'm going to remove this second object which that should be good then I'm just going to go over here and then add my own information and then I'm going to add a good little phone number going to add my own website here my favorite restaurant is f Daddy just a couple blocks St from my house my language is English okay
so I had to make a couple of changes there oh and I'm going to remove this final back tick here I had to make a couple changes to the structure in order to make it work I had to remove a few things so what I'm going to do just to make sure that I'm fine is I'm going to go over here to Json for.org I'm just going to paste all of this in and then I'm going to click validate sorry I'm going to click format and beautify if you click format and beautify and it gives
you an error like if to do this and then click format and beautify it says that there's an error it'll usually tell you where the error is and you can just fix it like that and so I just did this really quickly just make sure that that's fine looks good to me I'm going to go back here I'm going to just paste that in and we'll click okay and now what I'm going to do is I'm going to right click this and we're going to see whether or not this worked whether or not our API
call was successful looks like the status of this API request wasc success total sent one leads upload and in block list skip count invalid email count duplicate email count I wasn't expecting any of these keys or or values um the only one I was really wondering whether I'd get is this success one but just notice how it instantly structures their API a little bit differently than most other platforms do so that's how instantly did it which looks pretty cool all right and the last thing that I'm going to do is I'm just going to run
you through how to do oo2 all of the API requests we've made up until now have been using this make a request module now I'm going to go down to make an oo2 request now I'm going to run pretty quickly over this simply because the vast majority of the requests you're going to make are not going to be oo2 requests and O2 requests are just very annoying to do to be completely honest um but that's okay um I'll show you how to do it anyway for a platform called Deviant Art Deviant Art is just like
a big art platform uh they used to be really big like you know 5 10ish years ago I don't think they're anywhere near as big now but looks like AI artist just completely taken over their platform by the way that's so funny I think most people here like absolutely hate AI art which is funny or maybe they used to until it just like took over man like all of this stuff's AI art that's so funny okay uh I say this is somebody that used to run an AI Art website and I routinely get artists on
me being like this isn't real art how could you and it's like yeah I understand your concerns I do um but you know technolog is here and there's not much you can do about it okay so the make an oh 2.0 request looks different you have all the same information that you have underneath here but you also have this HTTP connection section what you need to do is need need to click add and there are a couple of quirks here um let's just go Nick at left click. a and let's call this Aug 12 2024
there are a couple of quirks here okay and these quirks can be pretty difficult to understand if you're not used to um any of this so I'm not going to go and explain the details behind each of these fields I'm just going to show you that if you want to make an O2 request just like there was an API key and the apis had instructions how to use them these apis will give you the authorized URI token URI client ID client secret Fields they'll just give you everything that you need essentially all you need to
do is just pump it all in here so the way to do this in Deviant Art is you need to go up to um deviantart.com developers and this is just specific to their API I just typed in like devian art API then you need to register your application so I'm going to register a new application I'm just going to call this example ooth 2 request you're going to select an ooth to Grand type mine's going to be authorization code if you click back here notice how they have the two same settings authorization code or implicit
you could pick either but I'm going to do authorization code because a little bit more complex then it says ooth to redirect URI white list now this is the thing that trips up 99% of people that try connecting stuff with ooth to anytime you see a redirect URI when you're designing or creating or publishing or registering your app or whatever what you need to do is you need to go to uh integrat oo2 um URL and then you need to get this specific URL here and that's what you need to use in order for your
whole oo2 flow to work you need to copy this URL and that's the one you need to to add into whatever the redirect URI section is I'm also going to put a white list in for integrat I don't think you actually need to do that um mind you and then I'm going to in this case for devv art I'm just going to disable comments and stuff like that because I don't want people commenting on my app my app is just a test app anyway and for whatever reason there's no way you can publish like a
secret app on deviantART it has to be a public app or something which is kind of dumb anyway then I'm just going to go back um here where it says your applications and keys and then just notice how there's published applications oh okay yeah I guess the oo to redirect URL weight list is required so I'm going to publish this oh I do not know what happened there my bad I think it was this one here I don't actually know but probably so uh then you're going to go to your application Al know it says
a client ID and a client secret so I'm going to paste in the client ID I'll go over here show this and then I'll paste in the client secret as well and then you'll notice there's an authorized URI token URI it's okay it's going to explain all of this for us in a second I'm then going to go to authentication it's going to give me a big breakdown of how authentication Works authorization code implicit client credentials the one that I care about is how to use the authorization code Grant so it's going to teach me
that I need to put this essentially in the um authorization URI which is right over here then I'm going to scroll down here to where it says getting a user access token I'm going to copy this one put it in the user access token URI and then um there's one more kind of gacha which a lot of these API documentations won't tell you about unfortunately um but it's about specifically how to um basically how to give yourself permissions and so all of these O2 API requests are going to include a scope and a scope is
just a very granular way of pro granting permissions to you a person that's going to do a connection and so um you need to do this specific to an API but I know for sure that deviant art has a permission called browse there's one called the browse daily deviation endpoint and it says the following Scopes are required to access this resource explicitly I need to provide a scope called browse so in order for me to do this connection I actually have to go down here and I actually have to physically write browse now what's happening
behind the hood is I'm basically going on to devart I'm providing all of these these details the client Ed the client Seeker the token U the authorized U and then in Deviant Art I have to like provide that integrat URL and then what's happening is when I click save what it's going to do is it's going to open a deviant art window right in front of me here and it's going to say hey do you authorize make.com or integromat to go in and use our Deviant Art application to do things like make API calls so
if I click save here as you see we're getting an authorizing window and because I've already clicked accept um it just opened and closed instantly but it's going to say hey do you authorize make.com to comment you click authorize or accept and then voila you have your connection and now all you do is you do the same thing you did before here's the URL I'm going to copy this in paste it in looks like the parameters here are get and then date so I don't actually need it because it's optional so I'm just going to
go to get request here I'm going to click parse response we'll go body type Raw contentp type application Json click okay I'm going to right click this and you'll see here that I got a 200 status code which means that my request was successful and it looks like they gave me a bunch of I don't know URLs of cool art let's open that puppy up that's pretty dope man oh yeah that's a cool signature I wonder if AI came up with that no looks like a person actually did wonderful yeah yeah yeah so that is
more or less it that's how to make API requests using three fundamental different types one where you put your API request in the header another where you put it in the request content and then the last one where you do it through ooth to I'm going to full screen this and then go to the last page and wish everybody good luck and congratulations on making it this far if you've kept with me until now you know more about how to make API connections and how to structure the HTTP module than probably 95% of other people
on make.com and that's even if you had no programming background no understanding and Jason no nothing so to reiterate there are a couple points I just want you to keep in mind moving forward the first is that HTTP is just a way to structure the text of a request it's a protocol for hyper hyper text transfer it's just an opinionated convention it's just a way that people started doing things a while ago agreed on and it's just sort of how we have to structure our requests now make makes it easy for us by providing a
bunch of structured Fields like the URL the header and the method you can use these fields in the way that I've shown you to communicate with apis very easy and because we're using make.com and make.com is pretty awesome if it wasn't I would have would not have built several businesses around it um as long as you keep in mind the three major ways that you can connect with authorize authenticate and then interact with apis you'll be good to reiterate there was the authorization flow here Phantom Busters had an x- phantombuster D ke-1 instantly just had
the API key directly in the request body and then ooth 2 basically just had three or four different API Keys they're just something different I really loved putting this video together love talking about make.com and specifically about HTTP requests and apis cuz just such like a big point of contention both in my community and on the internet you have everything that you need now to get out there and crush it if you have any questions please leave a comment down below and I'll get to it otherwise if you guys could do me a big favor
like subscribe do all the rest of that fun YouTube stuff and I'll catch you on the next video thanks so much bye-bye
Copyright © 2025. Made with ♥ in London by YTScribe.com