<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Vegan Tech</title>
    <description>The latest articles on DEV Community by Vegan Tech (@vegan_tech).</description>
    <link>https://dev.to/vegan_tech</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F949030%2Fa7852bef-6559-45bd-98aa-d585a0f907fb.PNG</url>
      <title>DEV Community: Vegan Tech</title>
      <link>https://dev.to/vegan_tech</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/vegan_tech"/>
    <language>en</language>
    <item>
      <title>Top ways to call an API</title>
      <dc:creator>Vegan Tech</dc:creator>
      <pubDate>Tue, 01 Nov 2022 16:19:05 +0000</pubDate>
      <link>https://dev.to/vegan_tech/top-ways-to-call-an-api-3f8a</link>
      <guid>https://dev.to/vegan_tech/top-ways-to-call-an-api-3f8a</guid>
      <description>&lt;p&gt;If you want to build your million-dollar startup or a hobby project, first, you need a server that manages your data and logic. To build a server, you need to know how a server works.&lt;/p&gt;

&lt;p&gt;A server usually contains multiple APIs. APIs are like a road that is used to send and receive data. Each API can be called in many different ways. Today I'll show you some of those ways.&lt;/p&gt;

&lt;p&gt;First of all, we need an API server. You can create your own server using your favorite programming language, or you can use services like &lt;a href="https://webhook.site"&gt;https://webhook.site&lt;/a&gt;, which lets you test APIs without needing to create a server. &lt;/p&gt;

&lt;p&gt;Now we're going to demonstrate the ways to call APIs using the &lt;a href="https://www.postman.com"&gt;Postman&lt;/a&gt; and the &lt;a href="https://apitester.org"&gt;API Tester&lt;/a&gt; (supports Android &amp;amp; iOS).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. GET&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The GET is the most popular way to call an API. It can be called from a browser directly. However, as the name describes, it is usually used to fetch data from the server.&lt;/p&gt;

&lt;p&gt;To call an API using the GET method, in Postman, select GET(1), input the API URL(2), and hit send(3).&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--WpJQ-W1n--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/c1ql9yrvexivnlykmzov.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--WpJQ-W1n--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/c1ql9yrvexivnlykmzov.png" alt="Image description" width="880" height="495"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The webhook page shows that the API got called using the GET method. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--TtHGXKvM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/sn2fbwdv1itwxuqmmmho.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--TtHGXKvM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/sn2fbwdv1itwxuqmmmho.png" alt="Image description" width="880" height="414"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Let's do the same using the API Tester APP (which supports Android &amp;amp; iOS ). First, open the app and click on the Create new request button. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--2dyRs5w0--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hjotzj8qrxffbna4bw1z.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--2dyRs5w0--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hjotzj8qrxffbna4bw1z.png" alt="Image description" width="540" height="960"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;From there, click on GET. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--10IImqnF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/b3klgn97z13ugq6h54xi.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--10IImqnF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/b3klgn97z13ugq6h54xi.png" alt="Image description" width="540" height="960"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Then input the webhook URL and click the send button at the top-right corner.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--g3uw-TMW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/frrixdz7q01rqf76ue82.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--g3uw-TMW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/frrixdz7q01rqf76ue82.png" alt="Image description" width="540" height="960"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You'll see there's a new call to the API with the GET method.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Toy-5Egs--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6urzk017uxgc7jaxjbbx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Toy-5Egs--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6urzk017uxgc7jaxjbbx.png" alt="Image description" width="880" height="414"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. POST&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The POST method is usually used to send data to the server from the app. For example, to call an API using the POST method, in Postman, select POST, input the API URL, and hit send.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--qAmL2vdT--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kfkks8shhkz012x833vy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--qAmL2vdT--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kfkks8shhkz012x833vy.png" alt="Image description" width="880" height="495"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Or, if you prefer your smartphone, in the API Tester app, create a new request using the POST option.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--xbYEuQN9--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yoick68oee2u7nas709p.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--xbYEuQN9--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yoick68oee2u7nas709p.png" alt="Image description" width="540" height="960"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Then input the API URL and click send.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--yJxnnM6W--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tuhuqn918hg1jlx4juho.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--yJxnnM6W--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tuhuqn918hg1jlx4juho.png" alt="Image description" width="540" height="960"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the webhook page, you'll see it got called using the POST method.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--vrj8jRia--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/oxk4cj82o8hcnupcc0dx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--vrj8jRia--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/oxk4cj82o8hcnupcc0dx.png" alt="Image description" width="880" height="414"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. PUT&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The PUT method is usually used to send data to the server from the app but to change or update specific data. For example, to call an API with the PUT method, in Postman, select PUT, input the API URL, and hit send.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--4sEbZPkB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kgjib6wcsfguugxedaaq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--4sEbZPkB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kgjib6wcsfguugxedaaq.png" alt="Image description" width="880" height="495"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Or, with the API Tester app, create a new request using the PUT option.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--82MNZbCr--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/aewtn2e25banvfklppm0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--82MNZbCr--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/aewtn2e25banvfklppm0.png" alt="Image description" width="540" height="960"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Then input the API URL and click send.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--jaRjXDD1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/oyy446xezpf3vtx7qczq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--jaRjXDD1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/oyy446xezpf3vtx7qczq.png" alt="Image description" width="540" height="960"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the webhook page, you'll see it got called using the PUT method. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--7Dz7IsRL--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/z7hd27miq03cj83fdj5s.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--7Dz7IsRL--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/z7hd27miq03cj83fdj5s.png" alt="Image description" width="880" height="414"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. DELETE&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The DELETE method is usually used to delete one or multiple data. To call an API with the DELETE method, in Postman, select DELETE, input the API URL, and hit send.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--qsyKFiRO--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gzvdm0nu78b4ibtntjhq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--qsyKFiRO--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gzvdm0nu78b4ibtntjhq.png" alt="Image description" width="880" height="495"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the API Tester app, create a new request using the DELETE option.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--xImAKiuw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ojhmccjx5bm5r27dozvm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--xImAKiuw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ojhmccjx5bm5r27dozvm.png" alt="Image description" width="540" height="960"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Then input the API URL and click send.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--GACKpKV5--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cmfmk3a9njdljnm1djng.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--GACKpKV5--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cmfmk3a9njdljnm1djng.png" alt="Image description" width="540" height="960"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the webhook page, you'll see it got called using the DELETE method. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ZFtHZqgv--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9vu05o1awiaqoh59r5z9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ZFtHZqgv--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9vu05o1awiaqoh59r5z9.png" alt="Image description" width="880" height="414"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;These are not just all, and there are other methods like PATCH, COPY, HEAD, and so on.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--AvwhrD2K--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/b3snsq6rieeio26yh6sp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--AvwhrD2K--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/b3snsq6rieeio26yh6sp.png" alt="Image description" width="175" height="499"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;All these methods can be found in the API Tester app. In addition, the API Tester app has even more methods to call APIs out of the box. Here are some screenshots of the supported methods in the API Tester app.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--t8stalJx--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/18i6eizjz9wpuaqw0hbh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--t8stalJx--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/18i6eizjz9wpuaqw0hbh.png" alt="Image description" width="535" height="174"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--AL7uVfWy--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nqk6lrvmm2hl8o3whta3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--AL7uVfWy--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nqk6lrvmm2hl8o3whta3.png" alt="Image description" width="534" height="178"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--C4RZvcL5--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/099n9hie48isktdg596i.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--C4RZvcL5--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/099n9hie48isktdg596i.png" alt="Image description" width="534" height="180"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can also call an API with a custom method of your own. Maybe your name or your company name, or your app name.&lt;/p&gt;

&lt;p&gt;If you want to test different APIs from your phone, give the API Tester app a try. It's free and supports Android &amp;amp; iOS. &lt;/p&gt;

&lt;p&gt;Now that you have created a server with multiple APIs, you want to protect it from hackers. Learn the top ways you can protect your server from hackers in my previous &lt;a href="https://dev.to/vegan_tech/top-ways-to-secure-apis-from-hackers-4jl7"&gt;post.&lt;/a&gt;&lt;/p&gt;

</description>
      <category>api</category>
      <category>testing</category>
    </item>
    <item>
      <title>Top ways to secure APIs from hackers</title>
      <dc:creator>Vegan Tech</dc:creator>
      <pubDate>Tue, 25 Oct 2022 15:30:16 +0000</pubDate>
      <link>https://dev.to/vegan_tech/top-ways-to-secure-apis-from-hackers-4jl7</link>
      <guid>https://dev.to/vegan_tech/top-ways-to-secure-apis-from-hackers-4jl7</guid>
      <description>&lt;p&gt;Hackers are everywhere. To protect our data and server from hackers, the backend developers need to put some security measures by adding different authorization techniques. Today we’ll show you some of those techniques.&lt;/p&gt;

&lt;p&gt;First of all, we need an API server. Thankfully, there are services like &lt;a href="https://webhook.site"&gt;https://webhook.site&lt;/a&gt;, which lets you test APIs without needing to create a server. &lt;/p&gt;

&lt;p&gt;Now we're going to demonstrate some techniques to secure the server using &lt;a href="https://www.postman.com"&gt;The Postman&lt;/a&gt; and &lt;a href="https://apitester.org"&gt;API Tester&lt;/a&gt; (supports Android &amp;amp; iOS). &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. API Key&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In this technique, developers put a Key and a Value in either the headers or the query. Let's do it the header way. In postman, we select the Authorization type to API Key (1). Now write a Key(2) and a Value(3). Then press Send(4).&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--_K9KvCsQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/huagqz10wlwnqmy0jlps.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--_K9KvCsQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/huagqz10wlwnqmy0jlps.png" alt="Image description" width="880" height="494"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now, if we look at the webhook page, we’ll see a new header key named somekey with the value somevalue.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--U0a8KmHQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pwbkob5hsgbximr90c5f.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--U0a8KmHQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pwbkob5hsgbximr90c5f.png" alt="Image description" width="880" height="414"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now we’ll do the same thing using API Tester. First open the app, and click on the Create new request button. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--5BzeojO8--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jsayza2mhaotuanpeozh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--5BzeojO8--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jsayza2mhaotuanpeozh.png" alt="Image description" width="728" height="1296"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;From here, click on GET. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--QNEke7br--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/d9nieufbwm9ardsnfdak.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--QNEke7br--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/d9nieufbwm9ardsnfdak.png" alt="Image description" width="728" height="1296"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Then add the webhook URL. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--VLGRqZKx--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5w9kv065wbq4l8yspqz4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--VLGRqZKx--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5w9kv065wbq4l8yspqz4.png" alt="Image description" width="728" height="1296"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Then click on Add Header(1) and put the Key(2) and Value(3). Then click on send button(4) at the top-right corner.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--iIY1VBaj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2oi8go834qt7ld9d1xje.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--iIY1VBaj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2oi8go834qt7ld9d1xje.png" alt="Image description" width="728" height="1296"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now again, if we look at the webhook page, we’ll see a new header key named somekey with the value somevalue has been received.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Ib9NSGoW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ibxsl34ryk34bu0bl6ut.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Ib9NSGoW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ibxsl34ryk34bu0bl6ut.png" alt="Image description" width="880" height="414"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Bearer Token&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Select authorization type as Bearer token and put the value of token as somevalue and click send.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--dfEH9hp---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/eoq4p2eaaics7f3w6cr5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--dfEH9hp---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/eoq4p2eaaics7f3w6cr5.png" alt="Image description" width="880" height="495"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the webhook page, we’ll see in the headers that there’s a new key named authorization &amp;amp; the value is Bearer somevalue.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--vWG-gja9--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/adw3ttnrw2u1o4xyo8m5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--vWG-gja9--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/adw3ttnrw2u1o4xyo8m5.png" alt="Image description" width="880" height="414"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now using the API Tester app, first add a new header key named Authorization, and the value would be Bearer somevalue and press send.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--nOVtK4_P--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jjd5hfsrzm6yf0m1wgzj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--nOVtK4_P--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jjd5hfsrzm6yf0m1wgzj.png" alt="Image description" width="728" height="1296"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;On the webhook page, we’ll see the bearer token successfully sent via the API Tester app.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Dedi7MD5--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ad5k4483r4c5wgx7iowv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Dedi7MD5--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ad5k4483r4c5wgx7iowv.png" alt="Image description" width="880" height="414"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Basic Auth&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Select authorization type as Basic Auth and put the username and password. Then click send.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--CVRf046o--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ywgkw02822bd201o9rxv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--CVRf046o--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ywgkw02822bd201o9rxv.png" alt="Image description" width="880" height="495"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If we look at the webhook page, we’ll see the username is sent as php-auth-user, and the password is sent as php-auth-pw. &lt;/p&gt;

&lt;p&gt;Now using the API Tester app, in the headers, create a new key with the name php-auth-user, then put the username as the value. Then create a new key with the name php-auth-pw and put the password as the value. Click on the send button.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--lb8IGpH_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/oeflebd8m7pf0qelsl86.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--lb8IGpH_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/oeflebd8m7pf0qelsl86.png" alt="Image description" width="728" height="1296"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;On the webhook page, we’ll see that the values are received.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--7rEOfVUW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/sldjjaqbq0a5xdwr0a3p.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--7rEOfVUW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/sldjjaqbq0a5xdwr0a3p.png" alt="Image description" width="880" height="414"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. No Auth&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;What if there are no authorization techniques implemented? We can mimic this API behavior in the postman by selecting the no auth option and just clicking on the send button.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--srWRTXrO--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hwdy8gsk4dhlahx3di7z.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--srWRTXrO--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hwdy8gsk4dhlahx3di7z.png" alt="Image description" width="880" height="495"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And in the API Tester app, remove all the headers by clicking on the edit button.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--e02DrBox--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/csa29tsc71c0lez7ha2e.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--e02DrBox--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/csa29tsc71c0lez7ha2e.png" alt="Image description" width="728" height="1296"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Then it’ll show the headers. Remove all the texts from here and press the cross button at the top-right corner.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--7MCjhUcQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ghvp1httydhk933azgs2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--7MCjhUcQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ghvp1httydhk933azgs2.png" alt="Image description" width="728" height="1296"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Then just click on the sent button. As you can see on the webhook page, it shows the request headers without any new keys or values. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--cia9hV5c--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/z2yycus08ucrgp9npgh7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--cia9hV5c--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/z2yycus08ucrgp9npgh7.png" alt="Image description" width="880" height="414"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now, if you are like me, who likes to work smart instead of working hard, you can simply export the APIs from Postman to the API Tester app by simply clicking on this button shown below.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--OT_aDKEt--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/752kjco4wxelsqf3opu2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--OT_aDKEt--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/752kjco4wxelsqf3opu2.png" alt="Image description" width="880" height="495"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Then select cURL and copy the texts below.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--sbMENVts--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/883m2w3484xxjr5btea9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--sbMENVts--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/883m2w3484xxjr5btea9.png" alt="Image description" width="880" height="495"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Then in the API Tester app, while creating a new request, click on the cURL button.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--pbnnD-e9--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/23z160fjdr7xh5q1s3yy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--pbnnD-e9--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/23z160fjdr7xh5q1s3yy.png" alt="Image description" width="728" height="1296"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Then paste the texts copied from the postman and click on import.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--0gtC4Wn_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/76byqll97gejqxogcq0t.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--0gtC4Wn_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/76byqll97gejqxogcq0t.png" alt="Image description" width="728" height="1296"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And voila! You have added a new request using the exported cURL texts.&lt;/p&gt;

&lt;p&gt;Give the &lt;a href="https://apitester.org"&gt;API Tester&lt;/a&gt; a try. It's free and supports Android &amp;amp; iOS. &lt;/p&gt;

</description>
      <category>api</category>
      <category>testing</category>
      <category>devops</category>
    </item>
  </channel>
</rss>
