{"componentChunkName":"component---src-templates-blog-list-template-js","path":"/engineering/21","result":{"data":{"allMarkdownRemark":{"edges":[{"node":{"excerpt":"Introduction to Github APIs What are APIs API stands for Application Program Interfaces, which developers use to access web tools or…","fields":{"slug":"/engineering/github-api/"},"html":"<h1 id=\"introduction-to-github-apis\" style=\"position:relative;\"><a href=\"#introduction-to-github-apis\" aria-label=\"introduction to github apis permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Introduction to Github APIs</h1>\n<h2 id=\"what-are-apis\" style=\"position:relative;\"><a href=\"#what-are-apis\" aria-label=\"what are apis permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>What are APIs</h2>\n<p>API stands for Application Program Interfaces, which developers use to access web tools or information on the cloud. It allows different cross-platform applications to talk to each other.\nOne of the common examples of it is <a href=\"https://cloud.google.com/speech-to-text\">Google Speech to Text API</a> used when you talk to Google Assistant.</p>\n<h2 id=\"what-is-github-apis\" style=\"position:relative;\"><a href=\"#what-is-github-apis\" aria-label=\"what is github apis permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>What is <a href=\"https://developer.github.com/v3/\">Github APIs</a></h2>\n<p>Github APIs( or Github ReST APIs) are the APIs that you can use to interact with GitHub. They allow you to create and manage repositories, branches, issues, pull requests, and many more.\nFor fetching publicly available information (like public repositories, user profiles, etc.), you can call the API. For other actions, you need to provide an authenticated token.</p>\n<h2 id=\"basic-github-apis-examples\" style=\"position:relative;\"><a href=\"#basic-github-apis-examples\" aria-label=\"basic github apis examples permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Basic Github APIs Examples</h2>\n<p>The base URL for GitHub APIs is:- <a href=\"https://api.github.com/\">GithubAPI</a></p>\n<h3 id=\"accessing-public-information\" style=\"position:relative;\"><a href=\"#accessing-public-information\" aria-label=\"accessing public information permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Accessing Public Information</h3>\n<h4 id=\"fetching-user-information-with-its-username\" style=\"position:relative;\"><a href=\"#fetching-user-information-with-its-username\" aria-label=\"fetching user information with its username permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Fetching user information with its username</h4>\n<p>Request type: GET\nAPI endpoint: /users/{username}</p>\n<p>Example :- <code>curl https://api.github.com/users/devkapilbansal</code></p>\n<p><span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 768px; \"\n    >\n      <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 79.23076923076923%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAQCAYAAAAWGF8bAAAACXBIWXMAAAsTAAALEwEAmpwYAAACTklEQVQ4y4VU2VbaUBTNS5e2KnawtVqrIEOCJEBmhkASIIEIVWj1of//IadnH4orcVn7sNdNbu7dZ+8zRBmdWTT+5lB4scW03KNJ2adQ9myaXPkUM7C675vUeVul7rtaAfk9JTgzaVbp0+x6QMubmMltGp1bZB+pckB/U2ZcUYth7FWovX8tBIL96hPZblWi7y6tzTnNGwEt1DFljLQeMHlE00pPyIenXYKT4WmHIABA4MGXDlmHjaJCWFnpEyFLa0PBvD5ixX1ZM5XRjCjTxmzdI+dYI/OwLg52ZHnVCiKtu6lcTtj2rRbShhXfdxJ6cJe04W9wgL279kyIF42RnF+o28C9Tzp5H1vkfbghBYX4aS1o1YpFAS6s9CkHSYT0zpjSD2MmZx69pQDPCPLobt+RpqQ6JF8IOYe/7EwIQYaIt1wcqAYZlIEQSvH84GT8bS7fM3YT8/3+5zb5rLJgGURiuRmypfGTxZ1CvCPwxkxl/57vIN9JdSAFgmWnpDHhuS0VXbUm0oOIZnKyfT7gsgXkBdGx4hL2kTPBiSHAHaxCGF64QoZIyAUUBV9NaQFU70Xs7VARGH9X9KUQIvnorZClQzF60y6pxSbO4fmk5KFEl54QQmF86Yp0WESfoefskibksOMcN2XtHtT+SazETAjLc54O9CCmI60FPDkjLlAkqvscBGmAC8nxQf0VQp6UjcWtwb2HqllHDcnPbgJewvP5LRCi5L+Ha1GJvwxGEfML5UDvRP/vH6ZACAuwCWLkDyQgRGFADrtQ9Voh8vgDh5znPWHDf5AAAAAASUVORK5CYII='); background-size: cover; display: block;\"\n  ></span>\n  <img\n        class=\"gatsby-resp-image-image\"\n        alt=\"user_details\"\n        title=\"user_details\"\n        src=\"/static/c9f56c8e81c084bad243f45322340f26/e5715/user_details.png\"\n        srcset=\"/static/c9f56c8e81c084bad243f45322340f26/a6d36/user_details.png 650w,\n/static/c9f56c8e81c084bad243f45322340f26/e5715/user_details.png 768w,\n/static/c9f56c8e81c084bad243f45322340f26/43fbc/user_details.png 797w\"\n        sizes=\"(max-width: 768px) 100vw, 768px\"\n        style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n        loading=\"lazy\"\n      />\n    </span></p>\n<p>As you can see, API returns us a JSON response with info about the user, like its image<em>url, name, mail</em>address.</p>\n<h4 id=\"fetching-users-followers-list\" style=\"position:relative;\"><a href=\"#fetching-users-followers-list\" aria-label=\"fetching users followers list permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Fetching user's followers' list</h4>\n<p>Request type: GET\nAPI endpoint: /users/{username}/followers</p>\n<p>Example :- <code>curl https://api.github.com/devkapilbansal/followers</code></p>\n<p><span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 768px; \"\n    >\n      <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 91.23076923076923%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAASCAYAAABb0P4QAAAACXBIWXMAAAsTAAALEwEAmpwYAAACsklEQVQ4y2VUaVcaQRDkk0dETKIJibkUYREQdpcbFjnkXlHwePmQ//8/OlU9Oys+PvTreTO9NTVd1ZvopivS/FSS9ukNclE6XyrSOSubjOh98yRIu9L9aoJ7/lFO3MOseB9MuIdX8TpRSzky+t2U2/OqTK+6MvhZl9pxPi4q713sROUgIy4DNbbO5kT1OCePlYnGfXGEGCow18wBGBqmPhhWlGX/vCa3331p4VWWmQVN1E7ysrweyMK5lUmmI4t8X9dL5Fk2iM+UeSovVbA32VEQsq1EbJWhjwN+QGZ3f1oyzYBdaaSxAsvVzVjCwkAmlx1lPME5a6ZXgbJsfCxI63NJ/GTOMKziNrLiE4e/GjIHOAFWpTsEAe/iVrAtD+WxPHkzWSMesR5ftGXwoybeUdYCOiicygYFYWGowac/15ayBgAzz578uWxcU8d9tkLFBEu2wD2Inuwlcwq4RjF7RlazXM986E4QMz1bR2Abb65M+fQ56oK0F4ujDNlD9oMisE9Ukw3nrYz6yfU7Md72C+hfUb3LmhiwcVrSxlrlWEQflvcvNayKO7EfxZYnY5XZDz73AYryyXwOjU7/8RJOho1q0tELlUDS2fUhAS3QFKDGj10Jo0vYeKo4RO4jv42jJ03YZRvQTAptAxALRAsZtQfaV1qG9qCN+mDdQM/YonrqWvtomdlIeGrsvjKkDymM9d0qMjjXbAuzUX+ql1Lt8WVbxzFA+GhBwocPefgAAxNsGY0erURAfsyzEGBqHfqRpsY5DW5HlH8owxA+NP6aKQtOBm302riXZ3z8Ug9h7oW8wOCvjVD+tlbyL9jII+p48fZPQgFdjAxFofvnTk9vowA0Ldc0Odec4zD6UZAV9/hcjp4RK2JYhSm5QTV7uI0qejjY9qCu6cu9yJv77z25/V/8D4+QKvyp8fRTAAAAAElFTkSuQmCC'); background-size: cover; display: block;\"\n  ></span>\n  <img\n        class=\"gatsby-resp-image-image\"\n        alt=\"followers\"\n        title=\"followers\"\n        src=\"/static/3298cd5d67ff8492417a65b6b7067d82/e5715/followers.png\"\n        srcset=\"/static/3298cd5d67ff8492417a65b6b7067d82/a6d36/followers.png 650w,\n/static/3298cd5d67ff8492417a65b6b7067d82/e5715/followers.png 768w,\n/static/3298cd5d67ff8492417a65b6b7067d82/5d72a/followers.png 834w\"\n        sizes=\"(max-width: 768px) 100vw, 768px\"\n        style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n        loading=\"lazy\"\n      />\n    </span></p>\n<p>This URL returns info about all the users that follow a particular user.</p>\n<h4 id=\"check-if-a-user-follows-another\" style=\"position:relative;\"><a href=\"#check-if-a-user-follows-another\" aria-label=\"check if a user follows another permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Check if a user follows another</h4>\n<p>Request type: GET\nAPI endpoint: /user/{username}/following/{target_username}</p>\n<p>This endpoint doesn't return any content. It just returns a status code.</p>\n<p>A status code of 204 means the <code>target_user</code> is followed by the user, whereas a status code of 404 means the user does not follow a <code>target_user</code>.</p>\n<p>Example :- <code>curl https://api.github.com/devkapilbansal/following/KapilBansal</code></p>\n<p>When a user follows another user\n<span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 768px; \"\n    >\n      <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 44.61538461538462%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAJCAYAAAAywQxIAAAACXBIWXMAAAsTAAALEwEAmpwYAAABkklEQVQoz21S2VLCQBDMgwdKed8n933EQAIkQDiihFsEKSyPB6v0/z+hnRlTpaU8dO3s7kxvz/Qqo5yDTqSKYaaFYbaNu4iF5pWOxqWOykEW1rEK60SFeZQXWMff4Lubzeg/KAtzjFHWwb16h16yAfMwB30nBWM3hcJWHHlfGJmVALKrAeTWgrR6oDi/HiaEflbKVWZGH3NjgJnex0Ohi3lpIOTdeB2DdBPdRB23YRNOsELKDTQuimhdl9AOlmUvd6EK2oGyKFeYZFbsYUrr1CMcpFuS2IlWBbdhCy49UDvVCDewibS0l0Z5PyOQmEZQ3E5CmWgunqjteWkInie/Xj8vSJKxm4ZOSdy+FBL0naScqxuR71Z9P1B9ESgv9hSv9gzP1QketA6mnlpuh5WIATRXSwxRRQmbw+RM+s8UbnlMykYeHJoNEzGhEzJhk1omrZ9pcs6mSbE/upzws/+Gd2eBD/cZj2SMG6uJImnBK9D8MYn/gu9+x0LoxmvyXboJG81LQ+bHEANIlSij/bI/t0zhFwMfEx90shsMAAAAAElFTkSuQmCC'); background-size: cover; display: block;\"\n  ></span>\n  <img\n        class=\"gatsby-resp-image-image\"\n        alt=\"follow\"\n        title=\"follow\"\n        src=\"/static/7bf691c6c057b3af9b9a09d1e8c6693c/e5715/user_follows.png\"\n        srcset=\"/static/7bf691c6c057b3af9b9a09d1e8c6693c/a6d36/user_follows.png 650w,\n/static/7bf691c6c057b3af9b9a09d1e8c6693c/e5715/user_follows.png 768w,\n/static/7bf691c6c057b3af9b9a09d1e8c6693c/076ca/user_follows.png 914w\"\n        sizes=\"(max-width: 768px) 100vw, 768px\"\n        style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n        loading=\"lazy\"\n      />\n    </span></p>\n<p>When a user doesn't follow another user\n<span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 768px; \"\n    >\n      <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 48%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAKCAYAAAC0VX7mAAAACXBIWXMAAAsTAAALEwEAmpwYAAABnUlEQVQoz3VSZ08CURC8LwI27KKodKTIAVcox9EREUSKQaKY+P//xbi7CDkifpi8kn2zM7NPaQWK6MWrGKSaeL6vgc/tYAl1v7HEjYHqtQbbl0PtWpe7mp9XHcZhArndKPJ7sTWUN72HidbDSO2gEypLIT+wLrIoHKflQWYnhIwr5FiDss96IhvgWmVm9vFefMGUSLsRC81AAfZVHs27gpCbRykY3gSRp6QB74unD3I2vUkUT9JUk5Q67SAOZZhpizpemZQbrOz3E3X0kw0MCO1QScCRPHJjatiN2niK2eKsG62gRI2URXWCr9oUs8KAlA6FqHFrros4v07YQoOy5AfLKFLIupcWV1ZXUD6sET4rY4xzXenG3ctnmXWBth+HfnhPVpNil6HTMJyD2BgKD4TVvaSbhJYQszIhJ2WcZ4VUVa80Wa1zVe70LRMWQra7sCf4br1LdpyN7aOhUFZsne05LTnBBH++zZwmPC8NRR2TVS5zUF1hPPx+DdUd3qpkG5kQzswBPqxXyo4GQFYYqw/MNvlji0pP9N/cnPgBKAkuDiU/fr4AAAAASUVORK5CYII='); background-size: cover; display: block;\"\n  ></span>\n  <img\n        class=\"gatsby-resp-image-image\"\n        alt=\"not_follow\"\n        title=\"not_follow\"\n        src=\"/static/3fe6f8c04f1e39452f3be90655c254f5/e5715/user_not_follows.png\"\n        srcset=\"/static/3fe6f8c04f1e39452f3be90655c254f5/a6d36/user_not_follows.png 650w,\n/static/3fe6f8c04f1e39452f3be90655c254f5/e5715/user_not_follows.png 768w,\n/static/3fe6f8c04f1e39452f3be90655c254f5/076ca/user_not_follows.png 914w\"\n        sizes=\"(max-width: 768px) 100vw, 768px\"\n        style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n        loading=\"lazy\"\n      />\n    </span></p>\n<h3 id=\"performing-tasks-as-an-authenticated-user\" style=\"position:relative;\"><a href=\"#performing-tasks-as-an-authenticated-user\" aria-label=\"performing tasks as an authenticated user permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Performing tasks as an authenticated user</h3>\n<p>If you provide an authenticated token, you don't need to provide a username in the endpoints mentioned above.</p>\n<p>By providing the token, you can create repositories/gists, comment on pull requests/issues, and all other tasks that you can perform from the Web Interface.</p>\n<h4 id=\"generating-token\" style=\"position:relative;\"><a href=\"#generating-token\" aria-label=\"generating token permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Generating Token</h4>\n<p>You can get a token by going to <a href=\"https://github.com/settings/tokens\">Personal access tokens</a> and clicking on <em>Generate new token</em>. You will be asked for the permissions/scopes of that token. Choose them <strong>wisely</strong> while creating one as some of these might be destructive.</p>\n<p>After selecting scopes, click on generate token and save the token somewhere as you will not see that token again.</p>\n<p><strong>Note</strong>:- Store your token in a secured environment while using it.</p>\n<h4 id=\"creating-a-repository\" style=\"position:relative;\"><a href=\"#creating-a-repository\" aria-label=\"creating a repository permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Creating a Repository</h4>\n<p>Request type: POST\nAPI endpoint: /user/{repos}\nRequired data: name</p>\n<p>Example :- <code>curl -H \"Authorization: token ${token}\" -d '{\"name\":\"Github API Testing\"}' https://api.github.com/user/repos</code></p>\n<p><span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 768px; \"\n    >\n      <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 68.46153846153847%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAOCAYAAAAvxDzwAAAACXBIWXMAAAsTAAALEwEAmpwYAAACMklEQVQ4y3VUZ3faQBDUpzjFdsqzHYJTAJteVOgIhGkS1ZTYJPn/P2Syswo8bJMP81a6u7c7uzN3hhe10ftRxzjVgRd10I7YuPtWRfdrBc3Lov67EQvetYOO7LufLYUXLet5ru2ifZqEMYg3MMnc4b40lOgJuujH6pqUcORQ8SSO0klCIPF1Qr+59hzmmxsYftLFPN8HExPedVmZ1T8V0LhgzOvBQ1hvb/8Lw/1iYZbrYZq9UwzjTWnJROU8DftdUuGcpVA+zyic09STBM8LGM3LEtZ2gEBmGKTa8JNtjBItmWtNWybj1pWpCAtlYErbh2wPkxrNqxKWpZGw62KS9rC0RlgUB1g7YzxUJliaI51pS861pDgTk/GO/VGGD9WZqkwwERlvJBKPtRm2jQW2EnnusTbHvRQcJpqovM8eSSiVfwoTznGS7mBRILsAa8vHpjyWvakkmmJbn8t/eK73varCHRPIaAhDsmDLMxWmi5XtyxiGypTFwsQTXR/duOjLfDkCtv6CIRNSELZAg9Y+5lD9kNMYfmf/Ifwun6W1VYpzVOWB2IR24eBZmbeAg+cNaUesvcJk1LgoqKkLr2J7I79oeSDMdH5yQ/xbF4HYhpHYKR8kO7pOqPmlk1Dt9BPD8xYZvrS7Emuwbc6NylIEivG7ucAfd4VfojLBWXOWVHojwg1iDdAlvFFhZyUybGEliqqxhQE9uTR99SLXaRUWCUUJ9vvzfE8fEJq/L48LLwAfh7+bbLKaXf+7ZwAAAABJRU5ErkJggg=='); background-size: cover; display: block;\"\n  ></span>\n  <img\n        class=\"gatsby-resp-image-image\"\n        alt=\"create repo\"\n        title=\"create repo\"\n        src=\"/static/40d3976b856cb7dd39bb99f5993cdad9/e5715/create_repo.png\"\n        srcset=\"/static/40d3976b856cb7dd39bb99f5993cdad9/a6d36/create_repo.png 650w,\n/static/40d3976b856cb7dd39bb99f5993cdad9/e5715/create_repo.png 768w,\n/static/40d3976b856cb7dd39bb99f5993cdad9/6a6e9/create_repo.png 826w\"\n        sizes=\"(max-width: 768px) 100vw, 768px\"\n        style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n        loading=\"lazy\"\n      />\n    </span></p>\n<h4 id=\"list-issues-assigned-to-you\" style=\"position:relative;\"><a href=\"#list-issues-assigned-to-you\" aria-label=\"list issues assigned to you permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>List issues assigned to you</h4>\n<p>Request type: GET\nAPI endpoint: /issues</p>\n<p>Example :- <code>curl -H \"Authorization: token ${token}\" https://api.github.com/issues</code></p>\n<p><span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 665px; \"\n    >\n      <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 120.61538461538461%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAYCAYAAAD6S912AAAACXBIWXMAAAsTAAALEwEAmpwYAAADYElEQVQ4y3WVaVsaUQyF/aRoVWwr1WrVAuLKvg6DIsiOiGu1/f8/JM2bWQpqP+TJzL1zz01OTjILzd2CVDZOpbGVk4vvBfP1WEYa2wV9L0p9MyPuVl7cbzndy8vFdt4878XVI8mvHM7ZQjl67H9YkKsfZfPt/ao9t/Yqcn1Qk+ufNemo8dw+qJoHOLMYl/TiT7PMUlxyy0lZKK4dyVNpJA+FgfQPGzI+bcljcSAPxaE8V8b2/Kj7L9WJvNan8tudyh/3Tp7LYxkcXcrQt268LqW1Y1koaYQcuMt2NRJHJulruc/3ZJrpqu/rRX0D/qWAZlyi3w+Pm/btNNORkT5Xv5x7KZeiJzLN9uTmrCVP5ZFGeCWD1IX01fCkC4/1WFYc8xkpr59INpKQ7JJnpM67l/L6saXcS9SNu4Cfsl5U/XxmxNvByD/j4NtiYAaYW0kaB71kw6KCx5JeAskcDnxoS97abFQBmKXMZjfhGlek+6C8jU6u5DbdMRoud4oqkaylHEinuVOS5m5JnK/p9xFySyfuyI1Wl+gA72hxsPZ+xfagobVXNr0GVFAEuAQkMC9CBQTkVitG5bC7XM9kROWRz+T82kCJEH7RKs9QU/iUCgVuEQaAFIbyd7U4yGUKmIJivAOOXF6dW1UDMrrRbzrS0kI2d4uzEcatIGgNEEBvztsW2WPBE7Un8KFFfq+GvHgfK9c9pamy4ckoBIQ7bgSMSCgKB1h79qMBFHupTQy4r0E0tWBwStphhGmqHHf9FABrWg+jyY62E0XpJV3jkEKZ13U89NDzCD8EzK+mdNMJSWeTngz0l4sk53UYeS/yWS0aIBEBZLLw2wrhBgI28KXEhxZeHBZlOWFATJnxWcu4o+kpDMJm3S6Mef0cmgbg+D1e8weDJxsFZGOiAFSbiYImkYMNV2jwu8SNzXaMb6pLvnsHiN4GqUubMJc6uTlIN2AcpDuczXTIM4c9Kjw6wpSzOhyC8OkCwq9ET80jiZJyCiVFLVRZ1wGeH1/x+aIQYU2b3DhkOFirtU2LCBffQhpwGPBmVGTDVuTiuaIAyOSlBWktAPmYKB0fxDgExOcwuIC1OcC0dgpj6F7HF3ORruFW169e3Z/S/5NO5m3K+bWUHeRnFbRRyFXU4w/7aEK/nYX4v0692ZvTkHO8AAAAAElFTkSuQmCC'); background-size: cover; display: block;\"\n  ></span>\n  <img\n        class=\"gatsby-resp-image-image\"\n        alt=\"list issues\"\n        title=\"list issues\"\n        src=\"/static/85d67a193b02e71dc4a7642ebde9eac7/5f4af/list_issues.png\"\n        srcset=\"/static/85d67a193b02e71dc4a7642ebde9eac7/a6d36/list_issues.png 650w,\n/static/85d67a193b02e71dc4a7642ebde9eac7/5f4af/list_issues.png 665w\"\n        sizes=\"(max-width: 665px) 100vw, 665px\"\n        style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n        loading=\"lazy\"\n      />\n    </span></p>\n<h4 id=\"creating-an-issue\" style=\"position:relative;\"><a href=\"#creating-an-issue\" aria-label=\"creating an issue permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Creating an issue</h4>\n<p>Request type: POST\nAPI endpoint: /repos/{owner}/{repo_name}/issues\nRequired data: title</p>\n<p>Example :- <code>curl -H \"Authorization: token ${token}\" -d '{\"title\":\"Issue_For_Test\"}' https://api.github.com/repos/devkapilbansal/Github-API-Testing/issues</code></p>\n<p><span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 768px; \"\n    >\n      <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 75.84615384615384%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAPCAYAAADkmO9VAAAACXBIWXMAAAsTAAALEwEAmpwYAAAB2ElEQVQ4y6VUaXPSUBTli7ZqR6t2dylbW5YsEAKBhD2sBdoKdRn///843nODjM5g0PHDmfsmyTvv3HPuS6J1XkY/Wccw42OQbmB81ZQarYeZAKNsgDAVvW9fVOCf2GielRGclXTtH1toCPxTG+6rHBKjbBMLM8TkuoWlM8HKneJzbYbvwQO++ff44s0Vy8oEs3wXY/mude7A2k/D2ktHdb22n2WQoIqF0cdtvoPpTRvTXAe9jzVQOUE1RP2tgephHrXXBZRfXKH0PLsVid6lh5G02Xnv6iZbTjP3UjCeJmFukFIV9loNlXDzz/obIXtny3NRybZJ7L0pqprqYQHeWpkS/LJxG5kSBqeljYfzYh935gAPpZHUEF1pvXFsonFkwjm43km2JrQ1DJpNslVlik/OWOvX+kJDIngYU6Z/sYS+KCQhw2A4SyFaSaKP7q0SMuE7a6Cjox7HkG1avreHOm/tdxX1sPuhqkkTfQmNz5sydyTc2bJ/YqF+ZKhH/JAJ63xJjdaprcn+MRSqYSAktvczsTP2V6G0LhyESQ/uyxyMJ9HM7VIR6yHv6KzQE7+q6h3BO0m1/0q2Jgx0RCZy7ZgkL/yu0YglDOVPMy+Kwsua+liR1v+n5R90abnC3EUCAgAAAABJRU5ErkJggg=='); background-size: cover; display: block;\"\n  ></span>\n  <img\n        class=\"gatsby-resp-image-image\"\n        alt=\"create_issue\"\n        title=\"create_issue\"\n        src=\"/static/de5adf93eab6a28c28e3efaf2a582fdf/e5715/create_issue.png\"\n        srcset=\"/static/de5adf93eab6a28c28e3efaf2a582fdf/a6d36/create_issue.png 650w,\n/static/de5adf93eab6a28c28e3efaf2a582fdf/e5715/create_issue.png 768w,\n/static/de5adf93eab6a28c28e3efaf2a582fdf/42de8/create_issue.png 1033w\"\n        sizes=\"(max-width: 768px) 100vw, 768px\"\n        style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n        loading=\"lazy\"\n      />\n    </span></p>\n<h4 id=\"commenting-on-issue\" style=\"position:relative;\"><a href=\"#commenting-on-issue\" aria-label=\"commenting on issue permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Commenting on issue</h4>\n<p>Request type: POST\nAPI endpoint: /repos/{owner}/{repo<em>name}/issues/{issue</em>no}/comments\nRequired data: body</p>\n<p>Example :- <code>curl -H \"Authorization: token ${token}\" -d '{\"body\":\"Test comment\"}' https://api.github.com/repos/devkapilbansal/Github-API-Testing/issues/1/comments</code></p>\n<p><span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 768px; \"\n    >\n      <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 46.30769230769231%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAJCAYAAAAywQxIAAAACXBIWXMAAAsTAAALEwEAmpwYAAABRUlEQVQoz4WRW0/CYAyGuRJUjEaFeBYYJzlswBiDAWMwGBugKMEL//8PeW27QGIC7uJNm+br2+drY/ajDjfbxbwwgF+ysXhz4BeHEoPySPKgzPUwdzNd9G7r6N7UYJL2kWrtyzJiYXP4mE1ZbOZmTAzuGhjeN2E/6Bg9tdFLhU1qIndQ2qmC2PilIyQzxQLTGlcV6BclNJMFtJJFyTV6XDvJQI1TU0JB4yx/VGL4XnexrIxJDuZEOlP64Lp5XRU1zwtCsGtiEtZBw8mriQ91KkafDQ+blo+tscBGD6TOQ3iYQ1/m7x4z+kP4RUZ8kLXmYdsOyMzHd2eFH2tNcSmmvA4m3RkeJWRDJvPyfTAtR48vztelIV5+AOfZgJXWZKeRhGwyzVm0M0MaeykV9Xh2L5W021kUnRgyyao6kT0xHR/hP4Iowl8NNw0dEQ8JhwAAAABJRU5ErkJggg=='); background-size: cover; display: block;\"\n  ></span>\n  <img\n        class=\"gatsby-resp-image-image\"\n        alt=\"comment\"\n        title=\"comment\"\n        src=\"/static/edc194854fb47af2320b13277b97dd42/e5715/comment_on_issue.png\"\n        srcset=\"/static/edc194854fb47af2320b13277b97dd42/a6d36/comment_on_issue.png 650w,\n/static/edc194854fb47af2320b13277b97dd42/e5715/comment_on_issue.png 768w,\n/static/edc194854fb47af2320b13277b97dd42/cf4cc/comment_on_issue.png 1079w\"\n        sizes=\"(max-width: 768px) 100vw, 768px\"\n        style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n        loading=\"lazy\"\n      />\n    </span></p>\n<p><strong>Note</strong> - The same endpoint is used for commenting on pull requests too. Just change the issue number with the pull request number.</p>\n<h4 id=\"openingclosing-an-issue\" style=\"position:relative;\"><a href=\"#openingclosing-an-issue\" aria-label=\"openingclosing an issue permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Opening/Closing an issue</h4>\n<p>Request type: PUT\nAPI endpoint: /repos/{owner}/{repo<em>name}/issues/{issue</em>no}</p>\n<p>Example :- <code>curl -H \"Authorization: token ${token}\" -d '{\"state\":\"close\"}' https://api.github.com/repos/devkapilbansal/Github-API-Testing/issues/1</code></p>\n<p><strong>Note</strong> - The same endpoint is valid for updating pull requests too.</p>\n<h4 id=\"results\" style=\"position:relative;\"><a href=\"#results\" aria-label=\"results permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Results</h4>\n<p>The above results can be verified on the GitHub website too.\n<span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 768px; \"\n    >\n      <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 46.46153846153846%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAJCAYAAAAywQxIAAAACXBIWXMAAAsTAAALEwEAmpwYAAABP0lEQVQoz32S3U7DMAyF+/5Pxw3iCjQJJIa0LfQniZPUORy7KxpCW6ajtJ3z+djxsMSCy3lGCBEhrUi1IWVBkoJM+TMVk6C29a8YK1IhpXps4fvQwd/aYGt8fsXp8IFcC9Z1RWvN997VBcaatHePP8xHPH2/+bN969RgMdf/kV4OCO9fmJktJjosjVkVNOOqraM0ZRL1wwZZVf1sv0KGfiUbtfJDiIJpEcKUhwkgyHcWIbXTvSLnwlLLBtW++d4d/gK5cq04hxkT+7rk5gAHNfgehT1mIuuZqnpleteh9YFZ59MFS0ruoLKHu4td9p55SdZfP/MImCXhePrENM2IcYPippx9iditJ78w011gtfEIE8vNDrMxqDeyUm03hyYphZf1AFg4PkvKnLsNJmzcPo+maCDOXWLMOE6My/8c/gA/+cL8hP1Z7AAAAABJRU5ErkJggg=='); background-size: cover; display: block;\"\n  ></span>\n  <img\n        class=\"gatsby-resp-image-image\"\n        alt=\"results\"\n        title=\"results\"\n        src=\"/static/4d950ce26d69f4f81cb7b84f9b6acd7b/e5715/output.png\"\n        srcset=\"/static/4d950ce26d69f4f81cb7b84f9b6acd7b/a6d36/output.png 650w,\n/static/4d950ce26d69f4f81cb7b84f9b6acd7b/e5715/output.png 768w,\n/static/4d950ce26d69f4f81cb7b84f9b6acd7b/332b4/output.png 1826w\"\n        sizes=\"(max-width: 768px) 100vw, 768px\"\n        style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n        loading=\"lazy\"\n      />\n    </span></p>\n<h2 id=\"conclusion\" style=\"position:relative;\"><a href=\"#conclusion\" aria-label=\"conclusion permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Conclusion</h2>\n<p>There are a lot more endpoints that you can explore at <a href=\"https://developer.github.com/v3\">Github</a>. Also, you can only do the work you are authorized to with that token.\nAlthough there are plenty of data fields that can be sent with these endpoints, only required ones are shown above.</p>\n<style class=\"grvsc-styles\">\n  .grvsc-container {\n    overflow: auto;\n    -webkit-overflow-scrolling: touch;\n    padding-top: 1rem;\n    padding-top: var(--grvsc-padding-top, var(--grvsc-padding-v, 1rem));\n    padding-bottom: 1rem;\n    padding-bottom: var(--grvsc-padding-bottom, var(--grvsc-padding-v, 1rem));\n    border-radius: 8px;\n    border-radius: var(--grvsc-border-radius, 8px);\n    font-feature-settings: normal;\n  }\n  \n  .grvsc-code {\n    display: inline-block;\n    min-width: 100%;\n  }\n  \n  .grvsc-line {\n    display: inline-block;\n    box-sizing: border-box;\n    width: 100%;\n    padding-left: 1.5rem;\n    padding-left: var(--grvsc-padding-left, var(--grvsc-padding-h, 1.5rem));\n    padding-right: 1.5rem;\n    padding-right: var(--grvsc-padding-right, var(--grvsc-padding-h, 1.5rem));\n  }\n  \n  .grvsc-line-highlighted {\n    background-color: var(--grvsc-line-highlighted-background-color, transparent);\n    box-shadow: inset var(--grvsc-line-highlighted-border-width, 4px) 0 0 0 var(--grvsc-line-highlighted-border-color, transparent);\n  }\n  \n</style>","frontmatter":{"date":"November 02, 2020","updated_date":null,"description":"Github APIs are a way to interact with Github. Here, we will learn about some basic things we can do with Github APIs.","title":"Introduction to Github APIs","tags":["Github","API"],"pinned":null,"coverImage":{"childImageSharp":{"fluid":{"aspectRatio":1.5037593984962405,"src":"/static/524ee49cabd1aaadf454989f10cb1e83/ee604/GitHub_coverImage.png","srcSet":"/static/524ee49cabd1aaadf454989f10cb1e83/69585/GitHub_coverImage.png 200w,\n/static/524ee49cabd1aaadf454989f10cb1e83/497c6/GitHub_coverImage.png 400w,\n/static/524ee49cabd1aaadf454989f10cb1e83/ee604/GitHub_coverImage.png 800w,\n/static/524ee49cabd1aaadf454989f10cb1e83/f3583/GitHub_coverImage.png 1200w","sizes":"(max-width: 800px) 100vw, 800px"}}},"author":{"id":"Kapil Bansal","github":"devkapilbansal","avatar":null}}}},{"node":{"excerpt":"What is Android Studio? In recent times, Android became the world's most popular operating system for various reasons. As an Android…","fields":{"slug":"/engineering/introduction-to-android-studio/"},"html":"<h3 id=\"what-is-android-studio\" style=\"position:relative;\"><a href=\"#what-is-android-studio\" aria-label=\"what is android studio permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>What is Android Studio?</h3>\n<p>In recent times, Android became the world's most popular operating system for various reasons. As an Android programmer, I want to share what the Android Studio is? Android Studio is an IDE for Google Android Development launched on 16th May 2013, during Google's I/O 2013 event. Android Studio contains all the Android tools to design, test, debug, and profile your application. The Android Studio uses <a href=\"https://gradle.org/\">Gradle</a> to manage your project, a Build Automation Tool.</p>\n<p>For developing your first app, you need to download Android Studio for your preferred platform (Windows®, Mac OS X, or Linux) from the <a href=\"https://developer.android.com/studio\">Android developers site</a>. Android Studio can develop and test your application on either a real device or an emulator.</p>\n<h5 id=\"android-studio-has-many-exciting-features-that-can-help-you-to-develop-your-android-application-like-\" style=\"position:relative;\"><a href=\"#android-studio-has-many-exciting-features-that-can-help-you-to-develop-your-android-application-like-\" aria-label=\"android studio has many exciting features that can help you to develop your android application like  permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Android Studio has many exciting features that can help you to develop your Android application like :</h5>\n<ul>\n<li>Powerful code editor with smart editing and code re-factoring.</li>\n<li>Emulator to show your code output in various resolutions, including Nexus 4, Nexus 7, Nexus 10, and many other android phones.</li>\n<li>Gradle based build support.</li>\n<li>Maven Support.</li>\n<li>Template-based wizards.</li>\n<li>Dracula Theme Environment to enjoy your coding experience.</li>\n</ul>\n<p>You can experience all the awesome features by using Android Studio in-hand.</p>\n<h3 id=\"lets-build-something\" style=\"position:relative;\"><a href=\"#lets-build-something\" aria-label=\"lets build something permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Let's Build Something!!!</h3>\n<p>In this article, we're going to build a simple \"Hello World\" Android Application.</p>\n<blockquote>\n<p>Requirement: Make sure you have Android Studio installed. If you don't, refer to this <a href=\"https://developer.android.com/studio\">link</a>. It's pretty straightforward.</p>\n</blockquote>\n<p>To create the application, we will follow these steps through the process in a pretty painless manner.</p>\n<p><strong>Step 1. Open your Android Studio after installing, and this following screen appears after starting:</strong></p>\n<p><span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 768px; \"\n    >\n      <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 57.692307692307686%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAMCAIAAADtbgqsAAAACXBIWXMAAA7DAAAOwwHHb6hkAAACd0lEQVQoz12RW0hTcRzHf/+d7bij87KJCl7SxKgx28T5oGcXN8/92jYvoYkFpYgI0UNGoBb2kAOZ7Uydg6iH6i0KIgoqhhXVQwZmN6Neegvqudf131n1EHweDl/48P3+/gcAau1kS2d7OMknCvPThbNz9x7l2Y+F3XM/CgvXf91ZuzA262/XvJ1ircsN4ESoBqBEFWC5odaTXF7JrBqZVHo9nU0bOSO7mc2urac3V43cSmo9lTI2NnLRSAzAYbGUtBJQV0110HS0LxDtpaO9gYjfHxoaF2cXR/w9oT66nw5EcB4KM02NHgCX2Vz9BwvU11d0cJzKC1oJWY6PHB0bnzihaoOCqOOE41VZibW1dpmzXaZpLqegYb+jg2VlllNKSHJMURKSFJOVeClhWFmQ9NZWHxYQcv5trgEX1B2qOsCxyj9ZUeOqmtD1IeV/2YvvRKjavLayyD5U31PlxjJezmLwQjWhaYO4VpRiHK9x2MeyqJmyg0AVCMrxR5Fuonm4xT/ASmFWYAd4NsIroqYruiprIq/gpH9ACEdFUcLyYSzYkJ1ClBXsFiwvBNzbi2GVYcSQFIweoQU9iFGGg2KC5vQgH1MZWWEklpWamzrxqQSibIi0IhsJZbCmdX1fDuwppwzfM/LyW9vNHeuNT+TsLfLkQ2r+HZz/cGbq6s+Z4xPdKkAbgerwZgRWAMICBOwsefdG1W3PfVb4CsZ7IrNrT30hu2bs+m3n5LfK0c/u+JunTDLvmwrYPOX4wYoyAYAA/+X85LEHB3OXvE8ahx4T01vUXL7i4vOysSvE0l249tqSeQHJV87TL+ODW7rvpsOlImgsXmuW/wZWoLVCaUTkKAAAAABJRU5ErkJggg=='); background-size: cover; display: block;\"\n  ></span>\n  <img\n        class=\"gatsby-resp-image-image\"\n        alt=\"alt_text\"\n        title=\"Welcome Screen\"\n        src=\"/static/8eec88f24d2afe21a2e72beadf0fe2c9/e5715/welcomepage.png\"\n        srcset=\"/static/8eec88f24d2afe21a2e72beadf0fe2c9/a6d36/welcomepage.png 650w,\n/static/8eec88f24d2afe21a2e72beadf0fe2c9/e5715/welcomepage.png 768w,\n/static/8eec88f24d2afe21a2e72beadf0fe2c9/681f1/welcomepage.png 899w\"\n        sizes=\"(max-width: 768px) 100vw, 768px\"\n        style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n        loading=\"lazy\"\n      />\n    </span></p>\n<p><strong>Step 2. Click on \"Start a New Android Project\" and choose the activity we want the project to be. For me, I'm selecting an empty activity.</strong></p>\n<p><span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 768px; \"\n    >\n      <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 74.76923076923076%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAPCAIAAABr+ngCAAAACXBIWXMAAA7DAAAOwwHHb6hkAAADcElEQVQozy3TbUhbVxgH8BPXpZrUzK50owtGrKaNaZrEe3Puyzn3/d68mERTY+pLY1hijElrfBnrqgwL7VqHYCsOJ6xCOybYSW1nWYThun3sXr5s7sNgY1u7D/0wYXQf3BjUQXYjhT8PDwd+nPPwcEBdnW18dOLN0YtXLky/PzV7++rC9srSb/e+vL658+17f/5968HOyv0nq7eXrsxfnpx9e3L68qUZTT0FgLmq6hCwWOrz+bOFwnDhXHF4bDyTLyTSuZ50ZiDVdybblxjIJDIDPelsOjc0mC9kc/nh4ghiFQBqK7h6/6s0K/CCxiKRZQUIEUvQtBdSNA99mHKTlIeEkCUJmnQRhJuEFFtvOw7AAYPhIKipPsIJmqSGecGPsYR52ZPoc/amkBzAkv9ET7/z9BksKIwacPSlXLGEJGtNze49XKfj1xAWOV7mBQVzkij7P9/64eedfzq7k8FIbGt7++vHjwXJn8rmn5TLpYffSJJqP+YFwFLBphorwhWjaCEdK2rw0aPfy+Vyf7K/PRrbffbsr6dPVVnL5Yv64fdbW6KkNds9z3GdqV43PBZEhuOwKIjq4uKNO8vzkXAw0JG+u7a5vLLhb+vFbZ2XZs71jw7ycshu159dW8GvmKwcEolwh6MnyWgh3ZM0Pk6wEMk4Oni4a6QhXhTb0pwWdnQl3dG4qgWbn+OXgNVs5Rn+UHEczC14Tp32hKKWianRu+ud5yewrGTvr499tMwzqPv19MNfvltaXdQHtNtdANQYDLXAfsAmMNzBsfPg2vzJWOJEJAbeeZf75FP3Gxe62uO7u//9+tOP+tqGhjLlf//Y/OIrLKjNTU4AjPsM1YB5uQkxvCsQPpro9QYiNJZOhjqOhdqdghIMhFc+vjN//SpFcdFYeO7mjZGLH2AsNh5tAeDFmioTSLY4RF7gkSQjkaYwRSGO4QVWYChEMxxBMiTEegMpDvoQhDSLhIYGx97N+8FZwqmoCq/6OVEmfTRJUkQlkIS0j6T2An2kz0eSXghdek8jm03H1VUGI9h4y8ORBOXCRCt2k0iPl2A9BHK5KZdeIe+m9Chu1M17g5FWCbdC65HGysfQ8YNCcK1lerZpnddWTfE108A9S27NPFYyRaeMEx++sLC571rJOLNhnPzMliolUSneOGc2QwM4bACm/wHHDRD71yJc+gAAAABJRU5ErkJggg=='); background-size: cover; display: block;\"\n  ></span>\n  <img\n        class=\"gatsby-resp-image-image\"\n        alt=\"alt_text\"\n        title=\"Choosing the Activity\"\n        src=\"/static/c5fef3dfc7ba07a49cd613a9921dca7f/e5715/empty.png\"\n        srcset=\"/static/c5fef3dfc7ba07a49cd613a9921dca7f/a6d36/empty.png 650w,\n/static/c5fef3dfc7ba07a49cd613a9921dca7f/e5715/empty.png 768w,\n/static/c5fef3dfc7ba07a49cd613a9921dca7f/5d030/empty.png 771w\"\n        sizes=\"(max-width: 768px) 100vw, 768px\"\n        style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n        loading=\"lazy\"\n      />\n    </span></p>\n<p><strong>Step 3. Configure your project by changing the project's name and the desired language the user wants to code with. Android Studio supports two languages, i.e., Java and Kotlin. The user can also choose their desired API, like which android version they want to run, and then click on finish.</strong></p>\n<p><span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 768px; \"\n    >\n      <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 74.61538461538461%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAPCAIAAABr+ngCAAAACXBIWXMAAA7DAAAOwwHHb6hkAAAC6ElEQVQoz12Qy08TURSHz7TFioKliUKjRApVDH1Np/OeuXPvPDqdtlDFRwLxAfhqItEAQgJqTFwQg4BUJcQYQ/wP3JqYGF34QJcu/QPc+YiJC1d6GcEEb77FWZzv/s45ANAcDEQSCY7twWbGGeAq02jw8/Xzz289Hbn669Phjz/GZ39en31yZoQky/mMw7I4Hk8DRHwgEg7HZmZuLC4sLS7U799bvl9/cHehPne3Pl+vLywuLW5Qp8zPLy0vr5y/MOqbUSq3BAK7czlJR6akIFnDgqxnOZHjxBzLszlhC6zA83JXIkWtv3I0FGqVZGQQGxuWpWFbJ8Sw3HK/WzlquX12sWptYrpV2/EyWRFglw+Vg62ipFNTdEqJwdNdg6cFx3MLZa/SbzolbHuE4pSIX5tWIZXm/eT1nVtCwTZZNmRJGxm9svbl69q370OXLmNkVg8fKxYrNIqYrmn5rBdb5cZQTFWwIKnjY1d/+48WsmIUvT6nULJpoOn+Y1OO+D5EWhraNCqL6tj45IY8MSXJOo3SDQsZloHtf1A5vSHvggZojm1rVWWkIbNcqU5OTU9NTZfLVUIKntdLZ8bE+U9OpfMAOwGaoIVpPtAQU0SEiK1omBdViqIZ9LBuqd8t9rrFCh2eWC7CNgX7chC2NzDbIcZEULQDK7qkYk03MSnQTE0numHbbp9peQZ2VI0oKqbQQ+jI6unJAYQbmUZoh+jRfYmyofECWr+5ShSNSIohyoi20h8FGfGSLkiIIgoaXbC7OwOwIwhhOMjsuWYkbZNPypwo5VUhr/J5mecUPq9Kksbl1SwrZbNiNiNwmZSYSetKdw/duYmhstvZ/mGWndALJw6dU+ThTjTURYYPkqEEGYqLlf1HzsZP1LoHLnf21lJa7WRm9BRb69ibZWAHAyGw93WtHq89PfTw0YFnWvEFjLwO3HwTmHsbuP0yeHEFVt/Bk/fweA1W1oJ33u6dfJP0XkWTs4GwDEz8D9ho5VVb0axbAAAAAElFTkSuQmCC'); background-size: cover; display: block;\"\n  ></span>\n  <img\n        class=\"gatsby-resp-image-image\"\n        alt=\"alt_text\"\n        title=\"Configuration Settings\"\n        src=\"/static/f016dd6a06c70393c083fd179a10651a/e5715/configure.png\"\n        srcset=\"/static/f016dd6a06c70393c083fd179a10651a/a6d36/configure.png 650w,\n/static/f016dd6a06c70393c083fd179a10651a/e5715/configure.png 768w,\n/static/f016dd6a06c70393c083fd179a10651a/9f82e/configure.png 820w\"\n        sizes=\"(max-width: 768px) 100vw, 768px\"\n        style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n        loading=\"lazy\"\n      />\n    </span></p>\n<p><strong>Step 4.Wait until your Gradle build finishes successfully and find your java and .xml file from folders of the app, as shown in the given image.</strong>\n<span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 768px; \"\n    >\n      <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 50.76923076923077%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAKCAIAAAA7N+mxAAAACXBIWXMAAA7DAAAOwwHHb6hkAAAAxElEQVQoz53R23LCIBCA4X0ZiLAc04AGSCGjttX3fyAhtk4uanrY+YYr/gEG8CFru5faVco4bb2yziqlTC/NC6GUkO/QBnx+T6erHQu62AxBDMFqZQXXShpjOCL93LwgXyshcH77KPNxmkqa8qKEmFFogVxKiSjYjnVPBkIqMdVyfqgxR0naCW265wPrbB1vZz/GpOvoNojLtdcO4bW+mTHOGG6DPJ+O50trxsnv053z8TdgcGPN+uFge/9XgMK0j5HmH26hjnDssBAWpwAAAABJRU5ErkJggg=='); background-size: cover; display: block;\"\n  ></span>\n  <img\n        class=\"gatsby-resp-image-image\"\n        alt=\"alt_text\"\n        title=\"First Page\"\n        src=\"/static/1ea0588ff9250141230c684953afbe7d/e5715/gradle.png\"\n        srcset=\"/static/1ea0588ff9250141230c684953afbe7d/a6d36/gradle.png 650w,\n/static/1ea0588ff9250141230c684953afbe7d/e5715/gradle.png 768w,\n/static/1ea0588ff9250141230c684953afbe7d/53ac9/gradle.png 1287w\"\n        sizes=\"(max-width: 768px) 100vw, 768px\"\n        style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n        loading=\"lazy\"\n      />\n    </span></p>\n<p><strong>Step 5. Click onto your .xml file to see the initial layout of the file like the given image. You can drag and drop from the palette's items and change your layout by dragging and dropping.</strong></p>\n<p><span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 768px; \"\n    >\n      <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 37.53846153846154%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAICAIAAAB2/0i6AAAACXBIWXMAAA7DAAAOwwHHb6hkAAABSklEQVQY032RTUvDMByH+wmU3afOw9qmL0nTpM2aNnWtYxPBiRPEg6BnwXkSHep38CI7DYSNiR9PBfXg1P82me6g4TnkkIcn8NMoFYSGHhVTKBM+lw5XFk8NUrFx4GLfRFg3HABZuFy2ALjbDtVkvkkqGeKxyeQUxCTxozRrUC6RRSybEC9gQQQ4mJsuR4DtmRbWsrwep5mI1Q9SRZGKZOoz4bh+aVXv9e5eXt+enx4Pzm8K+fHy1pkR1m3kaonKAKXyGUmS+bziYB973MVspVQeDh8+J+fouruQt4vNjhFu2Mj5ln8TJ1XIBiKmvpjKg8H9WP0YHV7eFmqnS9sdPWz8KUMZgDL058pX3cX1dvF/mdDAJWz27X5/OFZH71BezE+KzQtdTOQYXs8jk6pHQzAx4bAH7FTN6q3d/Z3WHpc13VMmW7NwACt8ARkzh66I9gBZAAAAAElFTkSuQmCC'); background-size: cover; display: block;\"\n  ></span>\n  <img\n        class=\"gatsby-resp-image-image\"\n        alt=\"alt_text\"\n        title=\"Layout\"\n        src=\"/static/02ab2b7c0393a9b386a619d2a1fccee7/e5715/xml.png\"\n        srcset=\"/static/02ab2b7c0393a9b386a619d2a1fccee7/a6d36/xml.png 650w,\n/static/02ab2b7c0393a9b386a619d2a1fccee7/e5715/xml.png 768w,\n/static/02ab2b7c0393a9b386a619d2a1fccee7/62a6a/xml.png 1122w\"\n        sizes=\"(max-width: 768px) 100vw, 768px\"\n        style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n        loading=\"lazy\"\n      />\n    </span></p>\n<p><strong>Step 6. At last, Run your file by the run button on the top right corner in your emulator configured.</strong>\n<strong>And hurray! You created your First Android Application!</strong></p>\n<h3 id=\"closing-thoughts\" style=\"position:relative;\"><a href=\"#closing-thoughts\" aria-label=\"closing thoughts permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Closing Thoughts</h3>\n<p>This article introduces Android, including just enough hands-on dragging and dropping to hopefully get you excited to know more about the Android platform. As we dig deeper, we can explore the capabilities of this great platform.</p>\n<style class=\"grvsc-styles\">\n  .grvsc-container {\n    overflow: auto;\n    -webkit-overflow-scrolling: touch;\n    padding-top: 1rem;\n    padding-top: var(--grvsc-padding-top, var(--grvsc-padding-v, 1rem));\n    padding-bottom: 1rem;\n    padding-bottom: var(--grvsc-padding-bottom, var(--grvsc-padding-v, 1rem));\n    border-radius: 8px;\n    border-radius: var(--grvsc-border-radius, 8px);\n    font-feature-settings: normal;\n  }\n  \n  .grvsc-code {\n    display: inline-block;\n    min-width: 100%;\n  }\n  \n  .grvsc-line {\n    display: inline-block;\n    box-sizing: border-box;\n    width: 100%;\n    padding-left: 1.5rem;\n    padding-left: var(--grvsc-padding-left, var(--grvsc-padding-h, 1.5rem));\n    padding-right: 1.5rem;\n    padding-right: var(--grvsc-padding-right, var(--grvsc-padding-h, 1.5rem));\n  }\n  \n  .grvsc-line-highlighted {\n    background-color: var(--grvsc-line-highlighted-background-color, transparent);\n    box-shadow: inset var(--grvsc-line-highlighted-border-width, 4px) 0 0 0 var(--grvsc-line-highlighted-border-color, transparent);\n  }\n  \n</style>","frontmatter":{"date":"October 30, 2020","updated_date":null,"description":"Getting Started with Android Studio and making your first app.","title":"Introduction to Android Studio","tags":["Android Studio","Android App"],"pinned":null,"coverImage":{"childImageSharp":{"fluid":{"aspectRatio":1.5037593984962405,"src":"/static/1ec6b3a597f04e058a2ab0da07091b0e/ee604/cover.png","srcSet":"/static/1ec6b3a597f04e058a2ab0da07091b0e/69585/cover.png 200w,\n/static/1ec6b3a597f04e058a2ab0da07091b0e/497c6/cover.png 400w,\n/static/1ec6b3a597f04e058a2ab0da07091b0e/ee604/cover.png 800w,\n/static/1ec6b3a597f04e058a2ab0da07091b0e/f3583/cover.png 1200w","sizes":"(max-width: 800px) 100vw, 800px"}}},"author":{"id":"Prithviraj Biswas","github":"prithvirajbytes","avatar":null}}}},{"node":{"excerpt":"A login screen is a web page or an entry page to a web/mobile application that requires user identification and authentication, regularly…","fields":{"slug":"/engineering/loginscreen-testing-tips/"},"html":"<p>A <strong>login screen</strong> is a web <strong>page</strong> or an entry <strong>page</strong> to a web/mobile application that requires user identification and authentication, regularly performed by entering a username and password combination.\nThe login process is the most essential feature for any system/application as it provides access to an entire <strong>web-site/application</strong> or part of it. So, testing of the login screen needs complete coverage. </p>\n<p><span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 568px; \"\n    >\n      <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 61.9718309859155%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAMCAIAAADtbgqsAAAACXBIWXMAABYlAAAWJQFJUiTwAAABAElEQVQoz5WRMU7FMAyGextOwQW4AXdiZmZgYgQhMSJWJIQEGyw8oVLcpHp5aUhspwGHBtSCQH2fXKup6vr//1ZEZIzpe2s2G2v798UQYSVX27Zaa4Dc45CJY8V5DQW5SSnlYUT03o8fk0dxMWXYWhuZKcPbDYuMqZO0jOIZQ2iaRislztdrs11gIsC5PuOc92GhZtErfqvvQ0nyb5gjEo8l4SCGanyfv/h/21Q2UpDNHEL4ncc8xdzB4fkjSJ0+vF7XhmRYfL/UdQuglAKAruskuh/jccjnk7vVzsHZ/vHV7uHF3tGlffPlVw0T0lxe3vzZHdLts7qv9c0KnjrLhB/ptboRLdjeDQAAAABJRU5ErkJggg=='); background-size: cover; display: block;\"\n  ></span>\n  <img\n        class=\"gatsby-resp-image-image\"\n        alt=\"Login Screen\"\n        title=\"Login Screen\"\n        src=\"/static/d6d1c63e505b5c45c02d656bf8c80e93/10e91/Login-Page.png\"\n        srcset=\"/static/d6d1c63e505b5c45c02d656bf8c80e93/10e91/Login-Page.png 568w\"\n        sizes=\"(max-width: 568px) 100vw, 568px\"\n        style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n        loading=\"lazy\"\n      />\n    </span></p>\n<p>Mentioned below are few tips that can be referred for testing the login screen of any system/application.</p>\n<p><strong>UI/UX:</strong></p>\n<ul>\n<li>Tab Order - Check if there is a logical order for using the tab key</li>\n<li>Focus on Username field - Check if, while landing on the page, the cursor is at the username field </li>\n<li>Use of enter key - Check if Login button is activated on selecting enter</li>\n<li>Accessibility - Check if all the fields on the page are correctly identified and labeled</li>\n<li>Look &#x26; Feel - Check if the page looks fine, and everything is aligned correctly.</li>\n<li>Content - Check if the content of the page is up to the mark. Are there any typos in the labels, controls of the screen?</li>\n<li>Links - Check if the page contains any existing links, and are these links still valid.</li>\n<li>Responsiveness - Check the responsiveness of the login screen in multiple sizes of computer monitors.</li>\n</ul>\n<p><strong>Security Checks:</strong></p>\n<ul>\n<li>Password - Check if the password shown or hidden(using asterisks)</li>\n<li>Password - Check if you can copy &#x26; paste the password from other applications.</li>\n<li>Password - Check if there is a minimum complexity on the password</li>\n<li>Password - Check if there is a 'Show password' option that is there or not. If yes, then check if it is working fine.</li>\n<li>Common Password Lookup - Check if the login screen is performing a lookup in the list of the most common passwords (<a href=\"https://en.wikipedia.org/wiki/List_of_the_most_common_passwords\">CommonPasswordsList</a>)</li>\n<li>View Source - Check the source code of the application and check if any valuable information given away in the HTML source code</li>\n<li>SQL Injection - Check if the login page is vulnerable to SQL input</li>\n<li>Pages - Check if you can access the other pages of the application without logging in.  </li>\n<li>URL Manipulation - Check if you are able to access the other pages of the application by editing the URLs, to gain access where it should not be allowed (without login).</li>\n<li>Multiple accounts - Check if by using different accounts, you can be logged in at the same time in the same browser</li>\n<li>Cookies - Check if you can edit and/or disable the cookies.</li>\n</ul>\n<p><strong>Functionality:</strong></p>\n<ul>\n<li>Login - Check the login functionality with valid/invalid credentials and without providing credentials.</li>\n<li>Logout - Check the logout functionality. Check on logging out; the user is logging out completely.</li>\n<li>Forgot password - Check if the forgot password option is available or not. And if it is there, does it work correctly. Also, check if it is prone to a security failure or URL manipulation</li>\n<li>Back and Forward buttons - Check how the application copes when using the browser's 'Back' and 'Forward' buttons.</li>\n<li>Remember me - Check if there is a \"Remember me\" option. And if it is present, then does it work as standard. Also, check what happens if the password is changed.</li>\n<li>Compatibility - Check the Login/Logout functionality with all possible valid/invalid cases in other browsers.</li>\n<li>Data - Check the username &#x26; password fields for data validation (Is there a minimum or maximum length of characters, boundary-values, what are the allowed characters, etc.).</li>\n<li>Error handling - Check how various errors are handled and displayed (for negative cases).</li>\n<li>Javascript-off test - Check if the login form still works when JavaScript is disabled.</li>\n<li>2FA Check - Check the login process when two-factor authentication is being provided; then test with valid/invalid token, test with valid/invalid backup code, test lockout procedure, and test recovery process.</li>\n</ul>\n<p><strong>Thanks for reading and happy testing!</strong></p>\n<style class=\"grvsc-styles\">\n  .grvsc-container {\n    overflow: auto;\n    -webkit-overflow-scrolling: touch;\n    padding-top: 1rem;\n    padding-top: var(--grvsc-padding-top, var(--grvsc-padding-v, 1rem));\n    padding-bottom: 1rem;\n    padding-bottom: var(--grvsc-padding-bottom, var(--grvsc-padding-v, 1rem));\n    border-radius: 8px;\n    border-radius: var(--grvsc-border-radius, 8px);\n    font-feature-settings: normal;\n  }\n  \n  .grvsc-code {\n    display: inline-block;\n    min-width: 100%;\n  }\n  \n  .grvsc-line {\n    display: inline-block;\n    box-sizing: border-box;\n    width: 100%;\n    padding-left: 1.5rem;\n    padding-left: var(--grvsc-padding-left, var(--grvsc-padding-h, 1.5rem));\n    padding-right: 1.5rem;\n    padding-right: var(--grvsc-padding-right, var(--grvsc-padding-h, 1.5rem));\n  }\n  \n  .grvsc-line-highlighted {\n    background-color: var(--grvsc-line-highlighted-background-color, transparent);\n    box-shadow: inset var(--grvsc-line-highlighted-border-width, 4px) 0 0 0 var(--grvsc-line-highlighted-border-color, transparent);\n  }\n  \n</style>","frontmatter":{"date":"October 30, 2020","updated_date":null,"description":"Login process is the most important feature for any system/application as it provides access to an entire web-site/application or part of it. This article is providing you with some important tips & ideas about login testing.","title":"Login Screen - Tips and Ideas for Testing","tags":["LoginScreen","TestingTips"],"pinned":null,"coverImage":{"childImageSharp":{"fluid":{"aspectRatio":1.5037593984962405,"src":"/static/738ab0a6b8bc95b50a8be6d5d7419083/14b42/CoverImage.jpg","srcSet":"/static/738ab0a6b8bc95b50a8be6d5d7419083/f836f/CoverImage.jpg 200w,\n/static/738ab0a6b8bc95b50a8be6d5d7419083/2244e/CoverImage.jpg 400w,\n/static/738ab0a6b8bc95b50a8be6d5d7419083/14b42/CoverImage.jpg 800w,\n/static/738ab0a6b8bc95b50a8be6d5d7419083/47498/CoverImage.jpg 1200w","sizes":"(max-width: 800px) 100vw, 800px"}}},"author":{"id":"Sudhey Sharma","github":"sudheysharma","avatar":null}}}},{"node":{"excerpt":"What is JAMstack JAMstack is not a specific set of tools or any language. Still, it's a new and modern way of building apps and sites that…","fields":{"slug":"/engineering/jamstack-introduction/"},"html":"<h2 id=\"what-is-jamstack\" style=\"position:relative;\"><a href=\"#what-is-jamstack\" aria-label=\"what is jamstack permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>What is JAMstack</h2>\n<p>JAMstack is not a specific set of tools or any language. Still, it's a new and modern way of building apps and sites that deliver better performance, higher security, lower scaling cost, and better developer experience. It achieves this by retaining most of the client-side functionality and abstracting all other functionality to the third-party API. APIs do all the heavy lifting. It is based on the client-side, and it doesn't depend on the backend server.</p>\n<p>JAM stands for <strong>JavaScript</strong>, <strong>APIs</strong> &#x26; <strong>Markup</strong>.</p>\n<p><strong>JavaScript</strong>:  Any dynamic programming during the request/response cycle is handled by the JS, running entirely on the client-side. It can be any front-end framework or library or even vanilla JavaScript.\n<strong>APIs</strong>: All server-side processes or database actions are contained in reusable APIs, accessed over HTTPS with JavaScript.  These can be custom-made or leveraged third party services.\n<strong>Markup</strong>:   Template markup must be pre-built at the time of deployment, usually using a site generator for content sites or a build tool for web applications.</p>\n<blockquote>\n<p>Modern web development architecture based on client-side JavaScript, reusable APIs, and pre-built Markup.</p>\n</blockquote>\n<p>The term was introduced by Mathias Biilmann, co-founder of  <a href=\"https://www.netlify.com/\">Netlify</a>.</p>\n<p>With the JAMstack, we have no longer talk about specific technologies such as web servers, programming languages, or databases.</p>\n<p>Check the following best practices defining a JAMstack project:</p>\n<ul>\n<li><strong>Entire site/app on a CDN</strong>\nJamstack project does not rely on server-side code; they can be distributed instead of on the same server. Directly serve from CDN unlocks speed and performance that cannot be beaten. The more your app can push you over the edge, the better the user experience.</li>\n<li><strong>Atomic deploys</strong>\nAs Jamstack projects get big, new changes may require redeploying hundreds of files. Uploading them one at a time can cause an inconsistent situation during the process. You can save this with a system that lets you do \"nuclear reflection,\" where any changes don't go live until all the converted files have been uploaded.</li>\n<li><strong>Instant cache invalidation</strong>\nWhen you do continuous deployment, then you need to know that when the deployment goes live, it is live. Remove any doubt by ensuring that your CDN can handle the cache purge immediately.</li>\n<li><strong>Everything lives in Git</strong>\nWith the Jamstack project, anyone should be able to clone a single clone, install any required dependencies with the standard process (such as npm install), and be prepared to run the full project locally. To clone a database, no complex installs. This contributor reduces friction and also simplifies the staffing and testing workflow.</li>\n<li><strong>Automated builds</strong>\nJamstack markup is prefabricated; content changes won't go live until you build another one. Automating this process will make you very frustrated. You can do this with a webhook or use a publishing platform that automatically includes the service.</li>\n</ul>\n<h2 id=\"value-of-jamstack\" style=\"position:relative;\"><a href=\"#value-of-jamstack\" aria-label=\"value of jamstack permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Value of JamStack</h2>\n<p>We can easily understand the JAMstack value when comparing it with a monolithic architecture, today's most common practice in Web development.  In a monolithic project, the frontend is closely coupled with a backend server, e.g., node js.  Each page request to backend server which pulls data from database renders into Html and then send it across the network.  A single page gets regenerated every time the server receives a request for that URL.\nIn a JAMstack architecture, the page request does not go to the server for Html because it directly fetches Html from CDN, where the Html file has been pre-built, and it's ready to be downloaded; that's why no server is involved here.</p>\n<h2 id=\"workflow-comparison-jamstack-vs-traditional\" style=\"position:relative;\"><a href=\"#workflow-comparison-jamstack-vs-traditional\" aria-label=\"workflow comparison jamstack vs traditional permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Workflow comparison (JAMstack vs. traditional)</h2>\n<p><span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 768px; \"\n    >\n      <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 75.07692307692308%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAPCAIAAABr+ngCAAAACXBIWXMAAAsTAAALEwEAmpwYAAACjElEQVQoz2VSW08TQRTmx/gn/AvG+KyJr77Io4lPPIAiCCYGiAGiJN7AmKKBaNWExAabghQFWnqB1gLtXtntXmevM7Mz62y3VBJPvsnOnG++nDPfnqH4IhzXN01gA8d1/TRDKR2wtu0wyrTsEMJBcojxBDsxAR5QTE2wdClwVRyaOAQIIcIicuIIWLpoaILe5T2QsAiCRMzWyd7L+YmbkbDU+TXNYDeeoc48ljJBEDC2kJ14v3An4l80tyZOi1N6fS6WFqH8ibWViH/n5kfvXXdPFhihVmbU6mzELw7E629H5sZvMbFSnulWZrTaHBUWkfw5EbNFIi+mLkG2ZZ5rqkCxjYLLbScs9I2zs6YotSNoocDA0Om3PfCmwRn7x2Jy7CWZmF6Y5oZksyxWz/TLLiaGQXCKrApxG063bJ3vU7eB7RoCLYQgKwztRqCVkH0E1DI0a4xFjHXaaWXMNzcOdlZAfVLeH1dKj6z6VNiaxsLrMIQxCbhmtrBXbFfeGIdj3O6YWX2MT6eRmCE9w4jCFVu1bz6XwfIakj76/AcoZqCyAdkvJaEq7HKdEuCzSFxVj5dBO4Ol1VD90XebUsweyL4dudvi5SRBopiSxDB2haKYepRGx21J1s3kPokoIf8MIz38EcwGr9PePjWMEJr6F9H48EQVum56TE1LxIaww9XXY2fbk78zULOA9U2o78LeJMqtnNL6ElsFm9twpRzS8lDNhUap3/bzp3dv37jiNyfN6gPmil176NbHEL+UDsn94Wsjw1dp54leHjUqjB33jkaR+C41LN7OZ5dfzXpKIVC3fKXANr6Sh8ZBWjm7vvJ1bYlYRaht9/ATdgvQrPYr9+fk4iV0gEvzQP8Di795GCpZw3zUjgAAAABJRU5ErkJggg=='); background-size: cover; display: block;\"\n  ></span>\n  <img\n        class=\"gatsby-resp-image-image\"\n        alt=\"jamstack-vs-traditional-workflow\"\n        title=\"jamstack-vs-traditional-workflow\"\n        src=\"/static/aaa765402caa478feef7b91e319d5983/e5715/image1.png\"\n        srcset=\"/static/aaa765402caa478feef7b91e319d5983/a6d36/image1.png 650w,\n/static/aaa765402caa478feef7b91e319d5983/e5715/image1.png 768w,\n/static/aaa765402caa478feef7b91e319d5983/d9199/image1.png 960w\"\n        sizes=\"(max-width: 768px) 100vw, 768px\"\n        style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n        loading=\"lazy\"\n      />\n    </span></p>\n<p><strong>Traditional workflow</strong></p>\n<p>→ Building and hosting are closely coupled.<br>\n→ Whenever a user requests a page, The file request to the back end and interacts with a database, back-end code, server, browser, and caching layers.<br>\n→ Updated code is pushed to servers often through FTP. The database must be updated again.\n→ Updated content is also pushed through CMS like WordPress, Joomla, or drupal.</p>\n<p><strong>JAMstack workflow</strong></p>\n<p>→ Building and hosting are loosely coupled.<br>\n→ Whenever a user requests a page, The file is already pre-built and directly served to the browser from a CDN.<br>\n→ Updated code is pushed through Git; Modern tools like static site generators easily re-built the entire site.\n→ Updated content is also pushed through GIt or static site CMS.</p>\n<h2 id=\"why-the-jamstack\" style=\"position:relative;\"><a href=\"#why-the-jamstack\" aria-label=\"why the jamstack permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Why the JAMstack?</h2>\n<p>A JAMstack architecture can bring all sorts of benefits to the sites and project workflows. Some of the key benefits are:</p>\n<p><strong>Faster performance:</strong> Building JAMstack helps to get pages generated at deploy time since they are mainly stored as Markup and can be served over a CDN.\n<strong>Higher security:</strong> JAMstack websites reduce server and database, so we don't need to worry about vulnerabilities anymore.\n<strong>Lower cost:</strong> It uses fewer resources, so comparably, it's lower than Others.\n<strong>Better developer experience</strong> Frontend developer can focus on frontend development without tied to monolithic architecture. Static site generators remove the need to maintain a separate stack for content and marketing.</p>\n<h2 id=\"thats-a-wrap\" style=\"position:relative;\"><a href=\"#thats-a-wrap\" aria-label=\"thats a wrap permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>That's A Wrap!</h2>\n<p>In a JAMStack architecture, however, the frontend and backend are decoupled. A frontend consists of JavaScript, HTML, and CSS. SSG generates these files during the build process and sends it over a CDN.</p>\n<p>A JAMStack backend is a content API that returns JSON/XML. This API can be a  hosted datastore, a  headless CMS, serverless functions, or a custom application.</p>\n<h2 id=\"useful-resources\" style=\"position:relative;\"><a href=\"#useful-resources\" aria-label=\"useful resources permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Useful resources</h2>\n<ul>\n<li><a href=\"https://jamstack.wtf/\">JAMstack WTF</a></li>\n<li><a href=\"https://github.com/automata/awesome-jamstack\">Awesome JAMstack</a></li>\n<li><a href=\"https://jamstack.slack.com/join/shared_invite/enQtNjc4OTI1NDk3NDI1LWIxZjk1YWRjOWVlMzM0MTVlMTg4YmY1OTBjZDc1M2I3N2NhODBlZDNmNjAzMGMwNzI5MTVlMWEwYjBiMTU2NzE\">JAMstack Community Slack</a></li>\n<li><a href=\"https://css-tricks.com/tag/jamstack/\">JAMstack on CSS-Tricks</a></li>\n<li><a href=\"https://jamstackconf.com/\">JAMstack_conf</a></li>\n<li><a href=\"https://www.heavybit.com/library/podcasts/jamstack-radio/\">JAMstack Radio</a></li>\n<li>JAMstack examples</li>\n</ul>\n<style class=\"grvsc-styles\">\n  .grvsc-container {\n    overflow: auto;\n    -webkit-overflow-scrolling: touch;\n    padding-top: 1rem;\n    padding-top: var(--grvsc-padding-top, var(--grvsc-padding-v, 1rem));\n    padding-bottom: 1rem;\n    padding-bottom: var(--grvsc-padding-bottom, var(--grvsc-padding-v, 1rem));\n    border-radius: 8px;\n    border-radius: var(--grvsc-border-radius, 8px);\n    font-feature-settings: normal;\n  }\n  \n  .grvsc-code {\n    display: inline-block;\n    min-width: 100%;\n  }\n  \n  .grvsc-line {\n    display: inline-block;\n    box-sizing: border-box;\n    width: 100%;\n    padding-left: 1.5rem;\n    padding-left: var(--grvsc-padding-left, var(--grvsc-padding-h, 1.5rem));\n    padding-right: 1.5rem;\n    padding-right: var(--grvsc-padding-right, var(--grvsc-padding-h, 1.5rem));\n  }\n  \n  .grvsc-line-highlighted {\n    background-color: var(--grvsc-line-highlighted-background-color, transparent);\n    box-shadow: inset var(--grvsc-line-highlighted-border-width, 4px) 0 0 0 var(--grvsc-line-highlighted-border-color, transparent);\n  }\n  \n</style>","frontmatter":{"date":"October 29, 2020","updated_date":null,"description":"You may have heard the term JAMstack before, but you may not have understood what it means. In this article, We will introduce you to JAMstack as to why you need, best practice, and value.","title":"Introduction to JAMstack","tags":["Jamstack","Web"],"pinned":null,"coverImage":{"childImageSharp":{"fluid":{"aspectRatio":1.5037593984962405,"src":"/static/bcb720c279e21781ba1caeeec7a1e54e/ee604/jamstack_cover.png","srcSet":"/static/bcb720c279e21781ba1caeeec7a1e54e/69585/jamstack_cover.png 200w,\n/static/bcb720c279e21781ba1caeeec7a1e54e/497c6/jamstack_cover.png 400w,\n/static/bcb720c279e21781ba1caeeec7a1e54e/ee604/jamstack_cover.png 800w,\n/static/bcb720c279e21781ba1caeeec7a1e54e/f3583/jamstack_cover.png 1200w","sizes":"(max-width: 800px) 100vw, 800px"}}},"author":{"id":"Versha Gupta","github":"vershagupta","avatar":null}}}},{"node":{"excerpt":"Overview React Speech Recognition is a react hook that accesses the Web Speech API to convert speech from the machine’s microphone to the…","fields":{"slug":"/engineering/quick-look-at-react-speech-recognition/"},"html":"<h2 id=\"overview\" style=\"position:relative;\"><a href=\"#overview\" aria-label=\"overview permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Overview</h2>\n<p>React Speech Recognition is a react hook that accesses the Web Speech API to convert speech from the machine’s microphone to the app’s React components.</p>\n<p>There are two hooks in this framework:</p>\n<ul>\n<li><em>useSpeechRecognition</em>, a React hook that gives component access to a transcript of speech picked up from the user’s microphone.</li>\n<li><em>SpeechRecognition</em> manages the global state of the Web Speech API, exposing functions to turn the microphone on and off.</li>\n</ul>\n<h2 id=\"prerequisites\" style=\"position:relative;\"><a href=\"#prerequisites\" aria-label=\"prerequisites permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Prerequisites</h2>\n<p>This version requires React 16.8 so that React hooks can be used; please see the full framework README <a href=\"https://www.npmjs.com/package/react-speech-recognition\">here</a> for more information.</p>\n<p>Note: This framework uses WebSpeech API. Browser support for this API is currently limited, with Chrome having the best experience. As of June 2020 these browsers support the API:</p>\n<ul>\n<li>Chrome (desktop): this is by far the smoothest experience</li>\n<li>Microsoft Edge</li>\n<li>Chrome (Android): a word of warning about this platform: there can be an annoying beeping sound when turning the microphone on. This is part of the Android OS and cannot be controlled from the browser</li>\n<li>Android webview</li>\n<li>Samsung Internet</li>\n</ul>\n<h2 id=\"what-well-make\" style=\"position:relative;\"><a href=\"#what-well-make\" aria-label=\"what well make permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>What We’ll Make</h2>\n<p>I will be making a simple voice memo app with basic voice commands that run in the browser. If you would like to follow this tutorial, please be ready to work with the create-react-app boilerplate.</p>\n<p><span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 768px; \"\n    >\n      <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 59.53846153846154%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAMCAYAAABiDJ37AAAACXBIWXMAABYlAAAWJQFJUiTwAAAAtUlEQVQoz81Syw6DIBD0/7/Ou49YD15a2gNKBBemQMDSBDW2PXSTyT5gJ7MLBWMMwzCAc45lWVYopUBEMMbAWfRHVly6DmVZoqoq1HWNpmnQtq3P+76HlPIcYQxcg3bQ2sOE+AyZJyQxg6Z584Ij20J6/lJIVgVpfGI55YXSBGmXL+1DeJ/Ec6ylZ6GurM8qvAuB2zR5sOAjruP4lrMAV3/YvvzIX1h25L2lH+HnCnf/4d8SPgHIT7R40yrbKAAAAABJRU5ErkJggg=='); background-size: cover; display: block;\"\n  ></span>\n  <img\n        class=\"gatsby-resp-image-image\"\n        alt=\"example\"\n        title=\"example\"\n        src=\"/static/2283a1f88a7a6981b2ce9d7f0cd28d71/e5715/styledExample.png\"\n        srcset=\"/static/2283a1f88a7a6981b2ce9d7f0cd28d71/a6d36/styledExample.png 650w,\n/static/2283a1f88a7a6981b2ce9d7f0cd28d71/e5715/styledExample.png 768w,\n/static/2283a1f88a7a6981b2ce9d7f0cd28d71/0c1c2/styledExample.png 1542w\"\n        sizes=\"(max-width: 768px) 100vw, 768px\"\n        style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n        loading=\"lazy\"\n      />\n    </span></p>\n<h2 id=\"lets-get-started\" style=\"position:relative;\"><a href=\"#lets-get-started\" aria-label=\"lets get started permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Let's Get Started</h2>\n<h3 id=\"step-1-setting-up-the-workspace\" style=\"position:relative;\"><a href=\"#step-1-setting-up-the-workspace\" aria-label=\"step 1 setting up the workspace permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Step 1: Setting up the workspace</h3>\n<ol>\n<li>Create a new react app with create-react-app.</li>\n</ol>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"js\" data-index=\"0\"><code class=\"grvsc-code\"><span class=\"grvsc-line\"><span class=\"mtk12\">npx</span><span class=\"mtk1\"> </span><span class=\"mtk12\">create</span><span class=\"mtk1\">-</span><span class=\"mtk12\">react</span><span class=\"mtk1\">-</span><span class=\"mtk12\">app</span><span class=\"mtk1\"> </span><span class=\"mtk12\">dictaphone</span></span></code></pre>\n<ol start=\"2\">\n<li>Modify the App.js file and add the dictaphone component like so:</li>\n</ol>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"js\" data-index=\"1\"><code class=\"grvsc-code\"><span class=\"grvsc-line\"><span class=\"mtk15\">import</span><span class=\"mtk1\"> </span><span class=\"mtk12\">Dictaphone</span><span class=\"mtk1\"> </span><span class=\"mtk15\">from</span><span class=\"mtk1\"> </span><span class=\"mtk8\">&#39;./dictaphoneSetup.js&#39;</span></span>\n<span class=\"grvsc-line\"></span>\n<span class=\"grvsc-line\"><span class=\"mtk4\">function</span><span class=\"mtk1\"> </span><span class=\"mtk11\">App</span><span class=\"mtk1\">() {</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  </span><span class=\"mtk15\">return</span><span class=\"mtk1\"> (</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">    </span><span class=\"mtk17\">&lt;</span><span class=\"mtk4\">div</span><span class=\"mtk1\"> </span><span class=\"mtk12\">className</span><span class=\"mtk1\">=</span><span class=\"mtk8\">&quot;App&quot;</span><span class=\"mtk17\">&gt;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">      </span><span class=\"mtk17\">&lt;</span><span class=\"mtk4\">header</span><span class=\"mtk1\"> </span><span class=\"mtk12\">className</span><span class=\"mtk1\">=</span><span class=\"mtk8\">&quot;Dictaphone-Tester&quot;</span><span class=\"mtk17\">&gt;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">        </span><span class=\"mtk17\">&lt;</span><span class=\"mtk10\">Dictaphone</span><span class=\"mtk1\"> </span><span class=\"mtk17\">/&gt;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">      </span><span class=\"mtk17\">&lt;/</span><span class=\"mtk4\">header</span><span class=\"mtk17\">&gt;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">    </span><span class=\"mtk17\">&lt;/</span><span class=\"mtk4\">div</span><span class=\"mtk17\">&gt;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  );</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">}</span></span>\n<span class=\"grvsc-line\"></span>\n<span class=\"grvsc-line\"><span class=\"mtk15\">export</span><span class=\"mtk1\"> </span><span class=\"mtk15\">default</span><span class=\"mtk1\"> </span><span class=\"mtk12\">App</span><span class=\"mtk1\">;</span></span></code></pre>\n<p>NOTE: We haven't built the Dictaphone component yet; we'll jump into that next!</p>\n<ol start=\"3\">\n<li>In the root directory of your app, install the react hook using:</li>\n</ol>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"js\" data-index=\"2\"><code class=\"grvsc-code\"><span class=\"grvsc-line\"><span class=\"mtk12\">npm</span><span class=\"mtk1\"> </span><span class=\"mtk12\">i</span><span class=\"mtk1\"> </span><span class=\"mtk12\">react</span><span class=\"mtk1\">-</span><span class=\"mtk12\">speech</span><span class=\"mtk1\">-</span><span class=\"mtk12\">recognition</span></span></code></pre>\n<ol start=\"4\">\n<li>Create a file to house the Dictaphone component in your src directory and import the necessary dependencies:</li>\n</ol>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"js\" data-index=\"3\"><code class=\"grvsc-code\"><span class=\"grvsc-line\"><span class=\"mtk15\">import</span><span class=\"mtk1\"> </span><span class=\"mtk12\">React</span><span class=\"mtk1\">, { </span><span class=\"mtk12\">useEffect</span><span class=\"mtk1\">, </span><span class=\"mtk12\">useState</span><span class=\"mtk1\"> } </span><span class=\"mtk15\">from</span><span class=\"mtk1\"> </span><span class=\"mtk8\">&#39;react&#39;</span><span class=\"mtk1\">;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk15\">import</span><span class=\"mtk1\"> </span><span class=\"mtk12\">SpeechRecognition</span><span class=\"mtk1\">, { </span><span class=\"mtk12\">useSpeechRecognition</span><span class=\"mtk1\"> } </span><span class=\"mtk15\">from</span><span class=\"mtk1\"> </span><span class=\"mtk8\">&#39;react-speech-recognition&#39;</span><span class=\"mtk1\">;</span></span></code></pre>\n<p>And that's it for our basic setup!</p>\n<h3 id=\"step-2-setting-up-the-dictaphone\" style=\"position:relative;\"><a href=\"#step-2-setting-up-the-dictaphone\" aria-label=\"step 2 setting up the dictaphone permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Step 2: Setting up the dictaphone</h3>\n<ol>\n<li>First, we will build the skeleton of our component:</li>\n</ol>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"js\" data-index=\"4\"><code class=\"grvsc-code\"><span class=\"grvsc-line\"><span class=\"mtk15\">import</span><span class=\"mtk1\"> </span><span class=\"mtk12\">React</span><span class=\"mtk1\">, { </span><span class=\"mtk12\">useEffect</span><span class=\"mtk1\">, </span><span class=\"mtk12\">useState</span><span class=\"mtk1\"> } </span><span class=\"mtk15\">from</span><span class=\"mtk1\"> </span><span class=\"mtk8\">&#39;react&#39;</span><span class=\"mtk1\">;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk15\">import</span><span class=\"mtk1\"> </span><span class=\"mtk12\">SpeechRecognition</span><span class=\"mtk1\">, { </span><span class=\"mtk12\">useSpeechRecognition</span><span class=\"mtk1\"> } </span><span class=\"mtk15\">from</span><span class=\"mtk1\"> </span><span class=\"mtk8\">&#39;react-speech-recognition&#39;</span><span class=\"mtk1\">;</span></span>\n<span class=\"grvsc-line\"></span>\n<span class=\"grvsc-line\"><span class=\"mtk4\">const</span><span class=\"mtk1\"> </span><span class=\"mtk11\">Dictaphone</span><span class=\"mtk1\"> = () </span><span class=\"mtk4\">=&gt;</span><span class=\"mtk1\"> {</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\"> </span><span class=\"mtk15\">return</span><span class=\"mtk1\"> (</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">   </span><span class=\"mtk17\">&lt;</span><span class=\"mtk4\">div</span><span class=\"mtk17\">&gt;&lt;/</span><span class=\"mtk4\">div</span><span class=\"mtk17\">&gt;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\"> );</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">};</span></span>\n<span class=\"grvsc-line\"></span>\n<span class=\"grvsc-line\"><span class=\"mtk15\">export</span><span class=\"mtk1\"> </span><span class=\"mtk15\">default</span><span class=\"mtk1\"> </span><span class=\"mtk12\">Dictaphone1</span><span class=\"mtk1\">;</span></span></code></pre>\n<ol start=\"2\">\n<li>\n<p>Next, we need to fetch certain props out of <em>useSpeechRecognition</em>. The props we will need are <em>transcript, interimTranscript, finalTranscript, resetTranscript,</em> and <em>listening</em>. You can do so like this:</p>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"js\" data-index=\"5\"><code class=\"grvsc-code\"><span class=\"grvsc-line\"><span class=\"mtk4\">const</span><span class=\"mtk1\"> {</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk12\">transcript</span><span class=\"mtk1\">,</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk12\">interimTranscript</span><span class=\"mtk1\">,</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk12\">finalTranscript</span><span class=\"mtk1\">,</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk12\">resetTranscript</span><span class=\"mtk1\">,</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk12\">listening</span><span class=\"mtk1\">,</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">} = </span><span class=\"mtk11\">useSpeechRecognition</span><span class=\"mtk1\">();</span></span></code></pre>\n<p>We will also need to enable commands through this hook so add <em>commands</em> to gain access:</p>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"js\" data-index=\"6\"><code class=\"grvsc-code\"><span class=\"grvsc-line\"><span class=\"mtk1\">} = </span><span class=\"mtk11\">useSpeechRecognition</span><span class=\"mtk1\">({ </span><span class=\"mtk12\">commands</span><span class=\"mtk1\"> });</span></span></code></pre>\n</li>\n<li>\n<p>Moving swiftly onward, we need to need to add several functions that are built into the hook and React. First we will be using <em>useEffect</em> to print the transcript to the page.</p>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"js\" data-index=\"7\"><code class=\"grvsc-code\"><span class=\"grvsc-line\"><span class=\"mtk11\">useEffect</span><span class=\"mtk1\">(() </span><span class=\"mtk4\">=&gt;</span><span class=\"mtk1\"> {</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk15\">if</span><span class=\"mtk1\"> (</span><span class=\"mtk12\">finalTranscript</span><span class=\"mtk1\"> !== </span><span class=\"mtk8\">&#39;&#39;</span><span class=\"mtk1\">) {</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\"> </span><span class=\"mtk10\">console</span><span class=\"mtk1\">.</span><span class=\"mtk11\">log</span><span class=\"mtk1\">(</span><span class=\"mtk8\">&#39;Got final result:&#39;</span><span class=\"mtk1\">, </span><span class=\"mtk12\">finalTranscript</span><span class=\"mtk1\">);</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">}</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">}, [</span><span class=\"mtk12\">interimTranscript</span><span class=\"mtk1\">, </span><span class=\"mtk12\">finalTranscript</span><span class=\"mtk1\">]);</span></span></code></pre>\n</li>\n<li>Then, we will add a listening function to start our dictaphone and throw in a quick conditional to alert the user if their browser is not compatible with this API. These functions would look like:</li>\n</ol>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"js\" data-index=\"8\"><code class=\"grvsc-code\"><span class=\"grvsc-line\"><span class=\"mtk1\"> </span><span class=\"mtk15\">if</span><span class=\"mtk1\"> (!</span><span class=\"mtk12\">SpeechRecognition</span><span class=\"mtk1\">.</span><span class=\"mtk11\">browserSupportsSpeechRecognition</span><span class=\"mtk1\">()) {</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">   </span><span class=\"mtk15\">return</span><span class=\"mtk1\"> </span><span class=\"mtk4\">null</span><span class=\"mtk1\">;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\"> }</span></span>\n<span class=\"grvsc-line\"></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\"> </span><span class=\"mtk15\">if</span><span class=\"mtk1\"> (!</span><span class=\"mtk12\">SpeechRecognition</span><span class=\"mtk1\">.</span><span class=\"mtk11\">browserSupportsSpeechRecognition</span><span class=\"mtk1\">()) {</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">   </span><span class=\"mtk10\">console</span><span class=\"mtk1\">.</span><span class=\"mtk11\">log</span><span class=\"mtk1\">(</span><span class=\"mtk8\">&#39;Your browser does not support speech recognition software! Try Chrome desktop, maybe?&#39;</span><span class=\"mtk1\">);</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\"> }</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\"> </span><span class=\"mtk4\">const</span><span class=\"mtk1\"> </span><span class=\"mtk11\">listenContinuously</span><span class=\"mtk1\"> = () </span><span class=\"mtk4\">=&gt;</span><span class=\"mtk1\"> {</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">   </span><span class=\"mtk12\">SpeechRecognition</span><span class=\"mtk1\">.</span><span class=\"mtk11\">startListening</span><span class=\"mtk1\">({</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">     </span><span class=\"mtk12\">continuous:</span><span class=\"mtk1\"> </span><span class=\"mtk4\">true</span><span class=\"mtk1\">,</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">     </span><span class=\"mtk12\">language:</span><span class=\"mtk1\"> </span><span class=\"mtk8\">&#39;en-GB&#39;</span><span class=\"mtk1\">,</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">   });</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\"> };</span></span></code></pre>\n<h3 id=\"step-3-building-the-dictaphone-controls-and-page-elements\" style=\"position:relative;\"><a href=\"#step-3-building-the-dictaphone-controls-and-page-elements\" aria-label=\"step 3 building the dictaphone controls and page elements permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Step 3: Building the dictaphone controls and page elements</h3>\n<p>We will add some page elements to access our dictaphone and print the words to the page. We will need three buttons: <em>stop, listen,</em> and <em>reset</em> - to control the dictaphone and reset the transcript. We may also want to add an indicator that informs the user if the dictaphone is listening or not. Within Dictaphone's return div create the following elements:</p>\n<ol>\n<li>A span that houses a ternary conditional that uses the <em>listening</em> prop of <em>useSpeechRecognition</em> to tell if the dictaphone is currently accessing the microphone or not. Add a 'Listening:' label for clarity reasons (Please see below diagram for more precise explanation).</li>\n<li>A <em>reset</em> button that will use the built-in function resetTranscript to- you guessed it- reset the transcript.</li>\n<li>A <em>listen</em> and <em>stop</em> button that will use the functions <em>listenContinuously</em> and <em>SpeechRecogniton.stopListening</em> respectively to control the dictaphone.</li>\n<li>One last span where we are housing our transcript.</li>\n</ol>\n<p>Your return statement should look similar to this:</p>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"js\" data-index=\"9\"><code class=\"grvsc-code\"><span class=\"grvsc-line\"><span class=\"mtk1\">  </span><span class=\"mtk15\">return</span><span class=\"mtk1\"> (</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">    </span><span class=\"mtk17\">&lt;</span><span class=\"mtk4\">div</span><span class=\"mtk17\">&gt;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">      </span><span class=\"mtk17\">&lt;</span><span class=\"mtk4\">div</span><span class=\"mtk17\">&gt;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">        </span><span class=\"mtk17\">&lt;</span><span class=\"mtk4\">span</span><span class=\"mtk17\">&gt;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">          listening:</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">          </span><span class=\"mtk4\">{</span><span class=\"mtk8\">&#39; &#39;</span><span class=\"mtk4\">}</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">          </span><span class=\"mtk4\">{</span><span class=\"mtk12\">listening</span><span class=\"mtk1\"> ? </span><span class=\"mtk8\">&#39;on&#39;</span><span class=\"mtk1\"> : </span><span class=\"mtk8\">&#39;off&#39;</span><span class=\"mtk4\">}</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">        </span><span class=\"mtk17\">&lt;/</span><span class=\"mtk4\">span</span><span class=\"mtk17\">&gt;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">        </span><span class=\"mtk17\">&lt;</span><span class=\"mtk4\">div</span><span class=\"mtk17\">&gt;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">          </span><span class=\"mtk17\">&lt;</span><span class=\"mtk4\">button</span><span class=\"mtk1\"> </span><span class=\"mtk12\">type</span><span class=\"mtk1\">=</span><span class=\"mtk8\">&quot;button&quot;</span><span class=\"mtk1\"> </span><span class=\"mtk12\">onClick</span><span class=\"mtk1\">=</span><span class=\"mtk4\">{</span><span class=\"mtk12\">resetTranscript</span><span class=\"mtk4\">}</span><span class=\"mtk17\">&gt;</span><span class=\"mtk1\">Reset</span><span class=\"mtk17\">&lt;/</span><span class=\"mtk4\">button</span><span class=\"mtk17\">&gt;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">          </span><span class=\"mtk17\">&lt;</span><span class=\"mtk4\">button</span><span class=\"mtk1\"> </span><span class=\"mtk12\">type</span><span class=\"mtk1\">=</span><span class=\"mtk8\">&quot;button&quot;</span><span class=\"mtk1\"> </span><span class=\"mtk12\">onClick</span><span class=\"mtk1\">=</span><span class=\"mtk4\">{</span><span class=\"mtk12\">listenContinuously</span><span class=\"mtk4\">}</span><span class=\"mtk17\">&gt;</span><span class=\"mtk1\">Listen</span><span class=\"mtk17\">&lt;/</span><span class=\"mtk4\">button</span><span class=\"mtk17\">&gt;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">          </span><span class=\"mtk17\">&lt;</span><span class=\"mtk4\">button</span><span class=\"mtk1\"> </span><span class=\"mtk12\">type</span><span class=\"mtk1\">=</span><span class=\"mtk8\">&quot;button&quot;</span><span class=\"mtk1\"> </span><span class=\"mtk12\">onClick</span><span class=\"mtk1\">=</span><span class=\"mtk4\">{</span><span class=\"mtk12\">SpeechRecognition</span><span class=\"mtk1\">.</span><span class=\"mtk12\">stopListening</span><span class=\"mtk4\">}</span><span class=\"mtk17\">&gt;</span><span class=\"mtk1\">Stop</span><span class=\"mtk17\">&lt;/</span><span class=\"mtk4\">button</span><span class=\"mtk17\">&gt;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">        </span><span class=\"mtk17\">&lt;/</span><span class=\"mtk4\">div</span><span class=\"mtk17\">&gt;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">      </span><span class=\"mtk17\">&lt;/</span><span class=\"mtk4\">div</span><span class=\"mtk17\">&gt;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">      </span><span class=\"mtk17\">&lt;</span><span class=\"mtk4\">div</span><span class=\"mtk17\">&gt;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">        </span><span class=\"mtk17\">&lt;</span><span class=\"mtk4\">span</span><span class=\"mtk17\">&gt;</span><span class=\"mtk4\">{</span><span class=\"mtk12\">transcript</span><span class=\"mtk4\">}</span><span class=\"mtk17\">&lt;/</span><span class=\"mtk4\">span</span><span class=\"mtk17\">&gt;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">      </span><span class=\"mtk17\">&lt;/</span><span class=\"mtk4\">div</span><span class=\"mtk17\">&gt;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">    </span><span class=\"mtk17\">&lt;/</span><span class=\"mtk4\">div</span><span class=\"mtk17\">&gt;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  );</span></span></code></pre>\n<p>If you go to <strong>localhost:3000</strong> in your browser, the dictaphone should now be working.</p>\n<h3 id=\"step-4-adding-commands\" style=\"position:relative;\"><a href=\"#step-4-adding-commands\" aria-label=\"step 4 adding commands permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Step 4: Adding commands</h3>\n<p>Now that our dictaphone is working, let's add some commands. We won't do anything too complicated but instead access the functions we already have at our disposal.</p>\n<p>Within the dictaphone component, declare an array called <strong>commands</strong>. This will be an array of objects containing two properties each:</p>\n<ul>\n<li>a command (string or regular expression)</li>\n<li>a callback</li>\n</ul>\n<p>A voice command that resets the transcript should look like this:</p>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"js\" data-index=\"10\"><code class=\"grvsc-code\"><span class=\"grvsc-line\"><span class=\"mtk1\"> </span><span class=\"mtk4\">const</span><span class=\"mtk1\"> </span><span class=\"mtk12\">commands</span><span class=\"mtk1\"> = [</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">   {</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">     </span><span class=\"mtk12\">command:</span><span class=\"mtk1\"> </span><span class=\"mtk8\">&#39;reset&#39;</span><span class=\"mtk1\">,</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">     </span><span class=\"mtk11\">callback</span><span class=\"mtk12\">:</span><span class=\"mtk1\"> () </span><span class=\"mtk4\">=&gt;</span><span class=\"mtk1\"> </span><span class=\"mtk11\">resetTranscript</span><span class=\"mtk1\">()</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">   },</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">   {</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">     </span><span class=\"mtk12\">command:</span><span class=\"mtk1\"> </span><span class=\"mtk8\">&#39;clear&#39;</span><span class=\"mtk1\">,</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">     </span><span class=\"mtk11\">callback</span><span class=\"mtk12\">:</span><span class=\"mtk1\"> () </span><span class=\"mtk4\">=&gt;</span><span class=\"mtk1\"> </span><span class=\"mtk11\">resetTranscript</span><span class=\"mtk1\">()</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">   }</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\"> ]</span></span></code></pre>\n<p>When the dictaphone picks up the words 'reset' or 'clear' from the user's speech, it will execute the callback associated with the command.</p>\n<p>Let's add a response feature. If we add a react hook to manipulate the state like this:</p>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"js\" data-index=\"11\"><code class=\"grvsc-code\"><span class=\"grvsc-line\"><span class=\"mtk4\">const</span><span class=\"mtk1\"> [</span><span class=\"mtk12\">message</span><span class=\"mtk1\">, </span><span class=\"mtk12\">setMessage</span><span class=\"mtk1\">] = </span><span class=\"mtk11\">useState</span><span class=\"mtk1\">(</span><span class=\"mtk8\">&#39;&#39;</span><span class=\"mtk1\">);</span></span></code></pre>\n<p>Then add the <em>message</em> to the output, we can add commands that generate a response. For instance, if I were to say ‘Hello’, the app would print back 'Hi there!' or something to that effect. Below, I've written some simple commands.</p>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"js\" data-index=\"12\"><code class=\"grvsc-code\"><span class=\"grvsc-line\"><span class=\"mtk1\"> </span><span class=\"mtk4\">const</span><span class=\"mtk1\"> </span><span class=\"mtk12\">commands</span><span class=\"mtk1\"> = [</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">   {</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">     </span><span class=\"mtk12\">command:</span><span class=\"mtk1\"> </span><span class=\"mtk8\">&#39;reset&#39;</span><span class=\"mtk1\">,</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">     </span><span class=\"mtk11\">callback</span><span class=\"mtk12\">:</span><span class=\"mtk1\"> () </span><span class=\"mtk4\">=&gt;</span><span class=\"mtk1\"> </span><span class=\"mtk11\">resetTranscript</span><span class=\"mtk1\">()</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">   },</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">   {</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">     </span><span class=\"mtk12\">command:</span><span class=\"mtk1\"> </span><span class=\"mtk8\">&#39;shut up&#39;</span><span class=\"mtk1\">,</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">     </span><span class=\"mtk11\">callback</span><span class=\"mtk12\">:</span><span class=\"mtk1\"> () </span><span class=\"mtk4\">=&gt;</span><span class=\"mtk1\"> </span><span class=\"mtk11\">setMessage</span><span class=\"mtk1\">(</span><span class=\"mtk8\">&#39;I wasn</span><span class=\"mtk6\">\\&#39;</span><span class=\"mtk8\">t talking.&#39;</span><span class=\"mtk1\">)</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">   },</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">   {</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">     </span><span class=\"mtk12\">command:</span><span class=\"mtk1\"> </span><span class=\"mtk8\">&#39;Hello&#39;</span><span class=\"mtk1\">,</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">     </span><span class=\"mtk11\">callback</span><span class=\"mtk12\">:</span><span class=\"mtk1\"> () </span><span class=\"mtk4\">=&gt;</span><span class=\"mtk1\"> </span><span class=\"mtk11\">setMessage</span><span class=\"mtk1\">(</span><span class=\"mtk8\">&#39;Hi there!&#39;</span><span class=\"mtk1\">)</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">   },</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\"> ]</span></span></code></pre>\n<p>With that our quick dictaphone is complete! Take a look at this code where it all comes together:</p>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"js\" data-index=\"13\"><code class=\"grvsc-code\"><span class=\"grvsc-line\"><span class=\"mtk15\">import</span><span class=\"mtk1\"> </span><span class=\"mtk12\">React</span><span class=\"mtk1\">, { </span><span class=\"mtk12\">useEffect</span><span class=\"mtk1\">, </span><span class=\"mtk12\">useState</span><span class=\"mtk1\"> } </span><span class=\"mtk15\">from</span><span class=\"mtk1\"> </span><span class=\"mtk8\">&#39;react&#39;</span><span class=\"mtk1\">;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk15\">import</span><span class=\"mtk1\"> </span><span class=\"mtk12\">SpeechRecognition</span><span class=\"mtk1\">, { </span><span class=\"mtk12\">useSpeechRecognition</span><span class=\"mtk1\"> } </span><span class=\"mtk15\">from</span><span class=\"mtk1\"> </span><span class=\"mtk8\">&#39;react-speech-recognition&#39;</span><span class=\"mtk1\">;</span></span>\n<span class=\"grvsc-line\"></span>\n<span class=\"grvsc-line\"><span class=\"mtk4\">const</span><span class=\"mtk1\"> </span><span class=\"mtk11\">Dictaphone1</span><span class=\"mtk1\"> = () </span><span class=\"mtk4\">=&gt;</span><span class=\"mtk1\"> {</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\"> </span><span class=\"mtk4\">const</span><span class=\"mtk1\"> [</span><span class=\"mtk12\">message</span><span class=\"mtk1\">, </span><span class=\"mtk12\">setMessage</span><span class=\"mtk1\">] = </span><span class=\"mtk11\">useState</span><span class=\"mtk1\">(</span><span class=\"mtk8\">&#39;&#39;</span><span class=\"mtk1\">);</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\"> </span><span class=\"mtk4\">const</span><span class=\"mtk1\"> </span><span class=\"mtk12\">commands</span><span class=\"mtk1\"> = [</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">   {</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">     </span><span class=\"mtk12\">command:</span><span class=\"mtk1\"> </span><span class=\"mtk8\">&#39;reset&#39;</span><span class=\"mtk1\">,</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">     </span><span class=\"mtk11\">callback</span><span class=\"mtk12\">:</span><span class=\"mtk1\"> () </span><span class=\"mtk4\">=&gt;</span><span class=\"mtk1\"> </span><span class=\"mtk11\">resetTranscript</span><span class=\"mtk1\">()</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">   },</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">   {</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">     </span><span class=\"mtk12\">command:</span><span class=\"mtk1\"> </span><span class=\"mtk8\">&#39;shut up&#39;</span><span class=\"mtk1\">,</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">     </span><span class=\"mtk11\">callback</span><span class=\"mtk12\">:</span><span class=\"mtk1\"> () </span><span class=\"mtk4\">=&gt;</span><span class=\"mtk1\"> </span><span class=\"mtk11\">setMessage</span><span class=\"mtk1\">(</span><span class=\"mtk8\">&#39;I wasn</span><span class=\"mtk6\">\\&#39;</span><span class=\"mtk8\">t talking.&#39;</span><span class=\"mtk1\">)</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">   },</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">   {</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">     </span><span class=\"mtk12\">command:</span><span class=\"mtk1\"> </span><span class=\"mtk8\">&#39;Hello&#39;</span><span class=\"mtk1\">,</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">     </span><span class=\"mtk11\">callback</span><span class=\"mtk12\">:</span><span class=\"mtk1\"> () </span><span class=\"mtk4\">=&gt;</span><span class=\"mtk1\"> </span><span class=\"mtk11\">setMessage</span><span class=\"mtk1\">(</span><span class=\"mtk8\">&#39;Hi there!&#39;</span><span class=\"mtk1\">)</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">   },</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\"> ]</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\"> </span><span class=\"mtk4\">const</span><span class=\"mtk1\"> {</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">   </span><span class=\"mtk12\">transcript</span><span class=\"mtk1\">,</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">   </span><span class=\"mtk12\">interimTranscript</span><span class=\"mtk1\">,</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">   </span><span class=\"mtk12\">finalTranscript</span><span class=\"mtk1\">,</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">   </span><span class=\"mtk12\">resetTranscript</span><span class=\"mtk1\">,</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">   </span><span class=\"mtk12\">listening</span><span class=\"mtk1\">,</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\"> } = </span><span class=\"mtk11\">useSpeechRecognition</span><span class=\"mtk1\">({ </span><span class=\"mtk12\">commands</span><span class=\"mtk1\"> });</span></span>\n<span class=\"grvsc-line\"></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\"> </span><span class=\"mtk11\">useEffect</span><span class=\"mtk1\">(() </span><span class=\"mtk4\">=&gt;</span><span class=\"mtk1\"> {</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">   </span><span class=\"mtk15\">if</span><span class=\"mtk1\"> (</span><span class=\"mtk12\">finalTranscript</span><span class=\"mtk1\"> !== </span><span class=\"mtk8\">&#39;&#39;</span><span class=\"mtk1\">) {</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">     </span><span class=\"mtk10\">console</span><span class=\"mtk1\">.</span><span class=\"mtk11\">log</span><span class=\"mtk1\">(</span><span class=\"mtk8\">&#39;Got final result:&#39;</span><span class=\"mtk1\">, </span><span class=\"mtk12\">finalTranscript</span><span class=\"mtk1\">);</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">   }</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\"> }, [</span><span class=\"mtk12\">interimTranscript</span><span class=\"mtk1\">, </span><span class=\"mtk12\">finalTranscript</span><span class=\"mtk1\">]);</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\"> </span><span class=\"mtk15\">if</span><span class=\"mtk1\"> (!</span><span class=\"mtk12\">SpeechRecognition</span><span class=\"mtk1\">.</span><span class=\"mtk11\">browserSupportsSpeechRecognition</span><span class=\"mtk1\">()) {</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">   </span><span class=\"mtk15\">return</span><span class=\"mtk1\"> </span><span class=\"mtk4\">null</span><span class=\"mtk1\">;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\"> }</span></span>\n<span class=\"grvsc-line\"></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\"> </span><span class=\"mtk15\">if</span><span class=\"mtk1\"> (!</span><span class=\"mtk12\">SpeechRecognition</span><span class=\"mtk1\">.</span><span class=\"mtk11\">browserSupportsSpeechRecognition</span><span class=\"mtk1\">()) {</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">   </span><span class=\"mtk10\">console</span><span class=\"mtk1\">.</span><span class=\"mtk11\">log</span><span class=\"mtk1\">(</span><span class=\"mtk8\">&#39;Your browser does not support speech recognition software! Try Chrome desktop, maybe?&#39;</span><span class=\"mtk1\">);</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\"> }</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\"> </span><span class=\"mtk4\">const</span><span class=\"mtk1\"> </span><span class=\"mtk11\">listenContinuously</span><span class=\"mtk1\"> = () </span><span class=\"mtk4\">=&gt;</span><span class=\"mtk1\"> {</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">   </span><span class=\"mtk12\">SpeechRecognition</span><span class=\"mtk1\">.</span><span class=\"mtk11\">startListening</span><span class=\"mtk1\">({</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">     </span><span class=\"mtk12\">continuous:</span><span class=\"mtk1\"> </span><span class=\"mtk4\">true</span><span class=\"mtk1\">,</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">     </span><span class=\"mtk12\">language:</span><span class=\"mtk1\"> </span><span class=\"mtk8\">&#39;en-GB&#39;</span><span class=\"mtk1\">,</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">   });</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\"> };</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\"> </span><span class=\"mtk15\">return</span><span class=\"mtk1\"> (</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">   </span><span class=\"mtk17\">&lt;</span><span class=\"mtk4\">div</span><span class=\"mtk17\">&gt;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">     </span><span class=\"mtk17\">&lt;</span><span class=\"mtk4\">div</span><span class=\"mtk17\">&gt;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">       </span><span class=\"mtk17\">&lt;</span><span class=\"mtk4\">span</span><span class=\"mtk17\">&gt;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">         listening:</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">         </span><span class=\"mtk4\">{</span><span class=\"mtk8\">&#39; &#39;</span><span class=\"mtk4\">}</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">         </span><span class=\"mtk4\">{</span><span class=\"mtk12\">listening</span><span class=\"mtk1\"> ? </span><span class=\"mtk8\">&#39;on&#39;</span><span class=\"mtk1\"> : </span><span class=\"mtk8\">&#39;off&#39;</span><span class=\"mtk4\">}</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">       </span><span class=\"mtk17\">&lt;/</span><span class=\"mtk4\">span</span><span class=\"mtk17\">&gt;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">       </span><span class=\"mtk17\">&lt;</span><span class=\"mtk4\">div</span><span class=\"mtk17\">&gt;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">         </span><span class=\"mtk17\">&lt;</span><span class=\"mtk4\">button</span><span class=\"mtk1\"> </span><span class=\"mtk12\">type</span><span class=\"mtk1\">=</span><span class=\"mtk8\">&quot;button&quot;</span><span class=\"mtk1\"> </span><span class=\"mtk12\">onClick</span><span class=\"mtk1\">=</span><span class=\"mtk4\">{</span><span class=\"mtk12\">resetTranscript</span><span class=\"mtk4\">}</span><span class=\"mtk17\">&gt;</span><span class=\"mtk1\">Reset</span><span class=\"mtk17\">&lt;/</span><span class=\"mtk4\">button</span><span class=\"mtk17\">&gt;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">         </span><span class=\"mtk17\">&lt;</span><span class=\"mtk4\">button</span><span class=\"mtk1\"> </span><span class=\"mtk12\">type</span><span class=\"mtk1\">=</span><span class=\"mtk8\">&quot;button&quot;</span><span class=\"mtk1\"> </span><span class=\"mtk12\">onClick</span><span class=\"mtk1\">=</span><span class=\"mtk4\">{</span><span class=\"mtk12\">listenContinuously</span><span class=\"mtk4\">}</span><span class=\"mtk17\">&gt;</span><span class=\"mtk1\">Listen</span><span class=\"mtk17\">&lt;/</span><span class=\"mtk4\">button</span><span class=\"mtk17\">&gt;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">         </span><span class=\"mtk17\">&lt;</span><span class=\"mtk4\">button</span><span class=\"mtk1\"> </span><span class=\"mtk12\">type</span><span class=\"mtk1\">=</span><span class=\"mtk8\">&quot;button&quot;</span><span class=\"mtk1\"> </span><span class=\"mtk12\">onClick</span><span class=\"mtk1\">=</span><span class=\"mtk4\">{</span><span class=\"mtk12\">SpeechRecognition</span><span class=\"mtk1\">.</span><span class=\"mtk12\">stopListening</span><span class=\"mtk4\">}</span><span class=\"mtk17\">&gt;</span><span class=\"mtk1\">Stop</span><span class=\"mtk17\">&lt;/</span><span class=\"mtk4\">button</span><span class=\"mtk17\">&gt;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">       </span><span class=\"mtk17\">&lt;/</span><span class=\"mtk4\">div</span><span class=\"mtk17\">&gt;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">     </span><span class=\"mtk17\">&lt;/</span><span class=\"mtk4\">div</span><span class=\"mtk17\">&gt;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">     </span><span class=\"mtk17\">&lt;</span><span class=\"mtk4\">div</span><span class=\"mtk17\">&gt;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">       </span><span class=\"mtk4\">{</span><span class=\"mtk12\">message</span><span class=\"mtk4\">}</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">     </span><span class=\"mtk17\">&lt;/</span><span class=\"mtk4\">div</span><span class=\"mtk17\">&gt;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">     </span><span class=\"mtk17\">&lt;</span><span class=\"mtk4\">div</span><span class=\"mtk17\">&gt;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">       </span><span class=\"mtk17\">&lt;</span><span class=\"mtk4\">span</span><span class=\"mtk17\">&gt;</span><span class=\"mtk4\">{</span><span class=\"mtk12\">transcript</span><span class=\"mtk4\">}</span><span class=\"mtk17\">&lt;/</span><span class=\"mtk4\">span</span><span class=\"mtk17\">&gt;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">     </span><span class=\"mtk17\">&lt;/</span><span class=\"mtk4\">div</span><span class=\"mtk17\">&gt;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">   </span><span class=\"mtk17\">&lt;/</span><span class=\"mtk4\">div</span><span class=\"mtk17\">&gt;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\"> );</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">};</span></span>\n<span class=\"grvsc-line\"></span>\n<span class=\"grvsc-line\"><span class=\"mtk15\">export</span><span class=\"mtk1\"> </span><span class=\"mtk15\">default</span><span class=\"mtk1\"> </span><span class=\"mtk12\">Dictaphone1</span><span class=\"mtk1\">;</span></span></code></pre>\n<p>Thanks for following along, and I hope this helps!</p>\n<style class=\"grvsc-styles\">\n  .grvsc-container {\n    overflow: auto;\n    -webkit-overflow-scrolling: touch;\n    padding-top: 1rem;\n    padding-top: var(--grvsc-padding-top, var(--grvsc-padding-v, 1rem));\n    padding-bottom: 1rem;\n    padding-bottom: var(--grvsc-padding-bottom, var(--grvsc-padding-v, 1rem));\n    border-radius: 8px;\n    border-radius: var(--grvsc-border-radius, 8px);\n    font-feature-settings: normal;\n  }\n  \n  .grvsc-code {\n    display: inline-block;\n    min-width: 100%;\n  }\n  \n  .grvsc-line {\n    display: inline-block;\n    box-sizing: border-box;\n    width: 100%;\n    padding-left: 1.5rem;\n    padding-left: var(--grvsc-padding-left, var(--grvsc-padding-h, 1.5rem));\n    padding-right: 1.5rem;\n    padding-right: var(--grvsc-padding-right, var(--grvsc-padding-h, 1.5rem));\n  }\n  \n  .grvsc-line-highlighted {\n    background-color: var(--grvsc-line-highlighted-background-color, transparent);\n    box-shadow: inset var(--grvsc-line-highlighted-border-width, 4px) 0 0 0 var(--grvsc-line-highlighted-border-color, transparent);\n  }\n  \n  .dark-default-dark {\n    background-color: #1E1E1E;\n    color: #D4D4D4;\n  }\n  .dark-default-dark .mtk12 { color: #9CDCFE; }\n  .dark-default-dark .mtk1 { color: #D4D4D4; }\n  .dark-default-dark .mtk15 { color: #C586C0; }\n  .dark-default-dark .mtk8 { color: #CE9178; }\n  .dark-default-dark .mtk4 { color: #569CD6; }\n  .dark-default-dark .mtk11 { color: #DCDCAA; }\n  .dark-default-dark .mtk17 { color: #808080; }\n  .dark-default-dark .mtk10 { color: #4EC9B0; }\n  .dark-default-dark .mtk6 { color: #D7BA7D; }\n</style>","frontmatter":{"date":"October 29, 2020","updated_date":null,"description":"Learning and exploring the react-speech-recognition hook basics.","title":"A Quick Look at the React Speech Recognition Hook","tags":["React","React Speech Recognition","React Speech","React Hook"],"pinned":null,"coverImage":{"childImageSharp":{"fluid":{"aspectRatio":1.5037593984962405,"src":"/static/afc3c0521bd8ce193a512ce11759f91c/14b42/mic.jpg","srcSet":"/static/afc3c0521bd8ce193a512ce11759f91c/f836f/mic.jpg 200w,\n/static/afc3c0521bd8ce193a512ce11759f91c/2244e/mic.jpg 400w,\n/static/afc3c0521bd8ce193a512ce11759f91c/14b42/mic.jpg 800w,\n/static/afc3c0521bd8ce193a512ce11759f91c/47498/mic.jpg 1200w,\n/static/afc3c0521bd8ce193a512ce11759f91c/0e329/mic.jpg 1600w,\n/static/afc3c0521bd8ce193a512ce11759f91c/c3e15/mic.jpg 4240w","sizes":"(max-width: 800px) 100vw, 800px"}}},"author":{"id":"Krista Singleton","github":"krissingl","avatar":null}}}},{"node":{"excerpt":"Why IoT and AI together make the perfect match! Statistics suggest that a whopping 64 billion IoT devices can be speculated by 2025. When we…","fields":{"slug":"/engineering/ai-and-iot-the-perfect-match/"},"html":"<h1 id=\"why-iot-and-ai-together-make-the-perfect-match\" style=\"position:relative;\"><a href=\"#why-iot-and-ai-together-make-the-perfect-match\" aria-label=\"why iot and ai together make the perfect match permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Why IoT and AI together make the perfect match!</h1>\n<p><a href=\"https://www.businessinsider.com/internet-of-things-report?IR=T\">Statistics</a> suggest that a whopping <strong>64 billion IoT devices can be speculated by 2025</strong>. When we talk about the latest technologies shaping the IT industry, Artificial Intelligence and the Internet of Things are often top the list. No wonder these technologies complement each other so well. The duet has revamped the conventional solutions both on the industrial and business fronts.\n</p>\n<p>Consolidating IoT with AI can help us make <em>Intelligent Machine</em>s. These smart automation systems not only help in facilitating the monotonous tasks but making witty decisions without even the slightest of human involvement.\n</p>\n<h2 id=\"how-ai-enhances-iot-based-systems\" style=\"position:relative;\"><a href=\"#how-ai-enhances-iot-based-systems\" aria-label=\"how ai enhances iot based systems permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>How AI enhances IoT-based Systems?</h2>\n<p>A typical IoT system integrates various sensors, servo motors, either on an Arduino board or Raspberry pi board. This integrated circuit is then fit into the device that is intended to be made smart. Now, these devices generate data. The data can either be structured or unstructured. The devices actually become smart when they invoke the experiential analysis from this data. This is where AI comes into the picture.\n</p>\n<p>Both IoT and AI have their part to play. IoT server generates humongous data, while AI has the potential to decipher and derive insights from it. Hence, by coupling both the capabilities, one can establish an intelligent-acting system.\n</p>\n<p>Businesses and Enterprises across verticals can leverage the IoT-based analysis to make efficacious decisions and creative plans. An artificial Intelligence-based IoT-system can also provide enhanced security and confidentiality.\n</p>\n<h2 id=\"why-use-ai-enabled-iot-systems\" style=\"position:relative;\"><a href=\"#why-use-ai-enabled-iot-systems\" aria-label=\"why use ai enabled iot systems permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Why use AI-enabled IoT Systems?</h2>\n<h3 id=\"increased-efficiency\" style=\"position:relative;\"><a href=\"#increased-efficiency\" aria-label=\"increased efficiency permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Increased Efficiency</h3>\n<p>The continuous data streams, along with complex data points, can be analyzed using various Machine Learning algorithms like Linear or Logistic Regression, Random Forest, etc. Which, in turn, can help find the loopholes that need to be fixed for efficient system execution.\n</p>\n<p>It also helps in identifying the deficiencies and find an optimal alternative for a pre-existing architecture. Thus, eventually resulting in increased efficiency.\n</p>\n<h3 id=\"reliable-disaster-recovery\" style=\"position:relative;\"><a href=\"#reliable-disaster-recovery\" aria-label=\"reliable disaster recovery permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Reliable Disaster Recovery</h3>\n<p>AI-enabled IoT systems can predict a wide range of risk points well in advance. This not only helps in mitigating the risk but also ensures a smooth recovery just in case the system failure occurs. This serves as a dual benefit saving the overhead expenses and avoiding a breakdown facilitating BAU (Business as Usual).\n</p>\n<p>Thus, enterprises should have a well-structured business continuity plan in place so that the risk mitigation can be implemented. IoT-based smart devices get a high degree of benefit when it comes to mitigating risk and disaster recovery, provided they have a research-intensive analysis in place.\n</p>\n<h3 id=\"better-scalability-prospects\" style=\"position:relative;\"><a href=\"#better-scalability-prospects\" aria-label=\"better scalability prospects permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Better Scalability Prospects</h3>\n<p>The low-end sensors and ICs which form the entire IoT system may not be cent percent accurate at all times. But, if the system has an AI filter that analyzes the data and sends the refined version for further processing, the scalability prospects can be increased dramatically.\n\nThink of it as a screening mechanism wherein the machine learning techniques analyze and filter the valid data points and transmit if further to give a more concrete overview of things.\n</p>\n<h3 id=\"reduced-overhead-expenditure\" style=\"position:relative;\"><a href=\"#reduced-overhead-expenditure\" aria-label=\"reduced overhead expenditure permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Reduced Overhead Expenditure</h3>\n<p>The smart systems are actually 'smart' when they employ experiential learning and caters to the users with a predictive fault-tolerant mechanism. The predictive maintenance enables the users to forecast possible damages and breakdowns well in time.\n\nAnother facet to the reduced expenditure is the reduced operational cost. The integration of AI into the IoT system saves the cost and effort for an explicit mechanism to handle data concerns.\n</p>\n<p>These were the benefits that an AI-based IoT-system offers to its users. Now, let's look at the real-world implementation of the same.\n</p>\n<h2 id=\"real-life-implications\" style=\"position:relative;\"><a href=\"#real-life-implications\" aria-label=\"real life implications permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Real-Life Implications</h2>\n<h3 id=\"self-driving-cars\" style=\"position:relative;\"><a href=\"#self-driving-cars\" aria-label=\"self driving cars permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Self Driving Cars</h3>\n<p>Self-Driving Cars are the best example of AI+IoT based system in the real world. These cars can predict the pedestrian's movements and suggest possible measures to be taken for the cognitive sensing machines. It helps in finding the suitable driving speed, amount of time, and the optimum path to reach a destination.\n</p>\n<h1 id=\"summing-up\" style=\"position:relative;\"><a href=\"#summing-up\" aria-label=\"summing up permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Summing Up</h1>\n<p> Thus, if we critically analyze the integration of Artificial Intelligence with the Internet of Things, then it is a win-win situation. The AI-based systems manage the data streams and evaluate data points in real-time to make wise decisions in order to optimize the performance and efficiency of the smart devices and automation systems.</p>\n<style class=\"grvsc-styles\">\n  .grvsc-container {\n    overflow: auto;\n    -webkit-overflow-scrolling: touch;\n    padding-top: 1rem;\n    padding-top: var(--grvsc-padding-top, var(--grvsc-padding-v, 1rem));\n    padding-bottom: 1rem;\n    padding-bottom: var(--grvsc-padding-bottom, var(--grvsc-padding-v, 1rem));\n    border-radius: 8px;\n    border-radius: var(--grvsc-border-radius, 8px);\n    font-feature-settings: normal;\n  }\n  \n  .grvsc-code {\n    display: inline-block;\n    min-width: 100%;\n  }\n  \n  .grvsc-line {\n    display: inline-block;\n    box-sizing: border-box;\n    width: 100%;\n    padding-left: 1.5rem;\n    padding-left: var(--grvsc-padding-left, var(--grvsc-padding-h, 1.5rem));\n    padding-right: 1.5rem;\n    padding-right: var(--grvsc-padding-right, var(--grvsc-padding-h, 1.5rem));\n  }\n  \n  .grvsc-line-highlighted {\n    background-color: var(--grvsc-line-highlighted-background-color, transparent);\n    box-shadow: inset var(--grvsc-line-highlighted-border-width, 4px) 0 0 0 var(--grvsc-line-highlighted-border-color, transparent);\n  }\n  \n</style>","frontmatter":{"date":"October 28, 2020","updated_date":null,"description":"AI and IOT are very popular these days. Let's understand Why IoT and AI together make the perfect match!","title":"IoT and AI - The Perfect Match","tags":["AI","IOT"],"pinned":null,"coverImage":{"childImageSharp":{"fluid":{"aspectRatio":1.5037593984962405,"src":"/static/b1b9c80796e949acd1bf6657ca06bcb3/14b42/cover.jpg","srcSet":"/static/b1b9c80796e949acd1bf6657ca06bcb3/f836f/cover.jpg 200w,\n/static/b1b9c80796e949acd1bf6657ca06bcb3/2244e/cover.jpg 400w,\n/static/b1b9c80796e949acd1bf6657ca06bcb3/14b42/cover.jpg 800w,\n/static/b1b9c80796e949acd1bf6657ca06bcb3/47498/cover.jpg 1200w","sizes":"(max-width: 800px) 100vw, 800px"}}},"author":{"id":"Devansh Agarwal","github":"Devanshh","avatar":null}}}}]},"markdownRemark":{"excerpt":"Google has prepared a roadmap to restrict third-party cookies in Chrome. Since 04 January 2024, Chrome has rolled out third-party cookie…","fields":{"slug":"/engineering/identity-impact-of-google-chrome-thirdparty-cookie-restrictions/"},"html":"<p>Google has prepared a roadmap to restrict third-party cookies in Chrome. Since 04 January 2024, Chrome has rolled out third-party cookie restrictions for 1% of stable clients and 20% of Canary, Dev, and Beta clients.</p>\n<p><strong>What does it mean for user authentication?</strong></p>\n<p>On one hand, Google believes third-party cookies are widely used for cross-site tracking, greatly affecting user privacy. Hence, Google wants to phase out (or restrict) supporting third-party cookies in Chrome by early Q2 2025 (subject to regulatory processes).</p>\n<p>On the other hand, Google introduced Privacy Sandbox to support the use cases (other than cross-site tracking and advertising) previously implemented using third-party cookies.</p>\n<p>In this article, we’ll discuss:</p>\n<ul>\n<li>How is user authentication (identity) affected?</li>\n<li>What is Google offering as part of Privacy Sandbox to support various identity use cases when third-party cookies are phased out?</li>\n</ul>\n<h2 id=\"how-is-user-authentication-affected\" style=\"position:relative;\"><a href=\"#how-is-user-authentication-affected\" aria-label=\"how is user authentication affected permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>How is User Authentication Affected?</h2>\n<p>Third-party cookie restrictions affect user authentication in three ways, as follows.</p>\n<h3 id=\"external-identity-providers\" style=\"position:relative;\"><a href=\"#external-identity-providers\" aria-label=\"external identity providers permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>External Identity Providers</h3>\n<p>If your website or app uses an external Identity Provider (IdP) — like LoginRadius, the IdP sets a third-party cookie when the user authenticates on your app.</p>\n<h3 id=\"web-sso\" style=\"position:relative;\"><a href=\"#web-sso\" aria-label=\"web sso permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Web SSO</h3>\n<p>If you have multiple apps across domains within your organization and authentication is handled using an IdP (internal or external) with web SSO, you already use third-party cookies to facilitate seamless access for each user using a single set of credentials.</p>\n<p>If you have implemented web SSO with one primary domain and multiple sub-domains of the primary domain, third-party cookie restrictions may not apply. For now, Google doesn’t consider the cookies set by sub-domains as third-party cookies, although this stance may change in the future.</p>\n<p>For example, you have apps at <code>example.com</code>, <code>travel.example.com</code>, <code>stay.example.com</code>, and web SSO is handled by <code>auth.example.com</code>. In this case, third-party cookie restrictions don’t apply.</p>\n<h3 id=\"federated-sso\" style=\"position:relative;\"><a href=\"#federated-sso\" aria-label=\"federated sso permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Federated SSO</h3>\n<p>Federated SSO is similar to, albeit different from, web SSO. It can handle multiple IdPs and applications—aka., Service Providers (SPs)—spanning multiple organizations. It can also implement authentication scenarios that are usually implemented through web SSO.</p>\n<p>Usually, authentication is handled on a separate pop-up or page when the user wants to authenticate rather than on the application or website a user visits. </p>\n<p>For example, you already use federated SSO if you facilitate authentication for a set of apps through multiple social identity providers as well as traditional usernames and passwords.</p>\n<blockquote>\n<p><strong>Note</strong>: It is also possible to store tokens locally, not within cookies. In this case, third-party cookie restrictions won’t affect token-based authentication. However, the restrictions still affect authentication where tokens are stored within third-party cookies (a common and secure method).</p>\n</blockquote>\n<h2 id=\"chromes-alternatives-for-third-party-cookies\" style=\"position:relative;\"><a href=\"#chromes-alternatives-for-third-party-cookies\" aria-label=\"chromes alternatives for third party cookies permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Chrome’s Alternatives for Third-Party Cookies</h2>\n<p>Google has been developing alternative features and capabilities for Chrome to replace third-party cookies as part of its Privacy Sandbox for Web initiative.</p>\n<p>Specific to authentication, Google recommends the following:</p>\n<ol>\n<li>Cookies Having Independent Partitioned State (CHIPS)</li>\n<li>Storage Access API</li>\n<li>Related Website Sets</li>\n<li>Federated Credential Management (FedCM) API</li>\n</ol>\n<h3 id=\"cookies-having-independent-partitioned-state-chips\" style=\"position:relative;\"><a href=\"#cookies-having-independent-partitioned-state-chips\" aria-label=\"cookies having independent partitioned state chips permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Cookies Having Independent Partitioned State (CHIPS)</h3>\n<p><a href=\"https://developers.google.com/privacy-sandbox/3pcd/chips\">CHIPS</a> are a restricted way of setting third-party cookies on a top-level site without making them accessible on other top-level sites. Thus, they limit cross-site tracking and enable specific cross-site functionalities, such as maps, chat, and payment embeds.</p>\n<p>For example, a user visits <code>a.com</code> with a map embed from <code>map-example.com</code>, which can set a partitioned cookie that is only accessible on a.com. </p>\n<p>If the user visits <code>b.com</code> with a map embed from <code>map-example.com</code>, it cannot access the partitioned cookie set on <code>a.com</code>. It has to create a separate partitioned cookie specific to <code>b.com</code>, thus blocking cross-site tracking yet allowing limited cross-site functionality.</p>\n<p>You should specifically opt for partitioned cookies (CHIPS), which are set with partitioned and secure cookie attributes.</p>\n<p>If you’re using an external identity provider for your application, CHIPS is a good option to supplant third-party cookie restrictions. </p>\n<p>However, CHIPS may not be ideal if you have a web SSO or federated SSO implementation. It creates separate partitioned cookies for each application with a separate domain, which can increase complexity and create compatibility issues.</p>\n<h3 id=\"storage-access-api\" style=\"position:relative;\"><a href=\"#storage-access-api\" aria-label=\"storage access api permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Storage Access API</h3>\n<p>With <a href=\"https://developers.google.com/privacy-sandbox/3pcd/storage-access-api\">Storage Access API</a>, you can access the local storage in a third-party context through iframes, similar to when users visit it as a top-level site in a first-party context. That is, it gives access to unpartitioned cookies and storage.</p>\n<p>Storage Access API requires explicit user approval to grant access, similar to locations, camera, and microphone permissions. If the user denies access, unpartitioned cookies and storage won’t be accessible in a third-party context.</p>\n<p>It is most suitable when loading cross-site resources and interactions, such as:</p>\n<p>Verifying user sessions when allowing interactions on an embedded social post or providing personalization for an embedded video.\nEmbedded documents requiring user verification status to be accessible.</p>\n<p>As it requires explicit user approval, it is advisable to use Storage Access API when you can’t implement an identity use case with the other options.</p>\n<h3 id=\"related-website-sets\" style=\"position:relative;\"><a href=\"#related-website-sets\" aria-label=\"related website sets permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Related Website Sets</h3>\n<p>With <a href=\"https://developers.google.com/privacy-sandbox/3pcd/related-website-sets\">Related Website Sets</a>, you can declare a <code>primary</code> website and <code>associatedSites</code> for limited purposes to grant third-party cookie access and local storage for a limited number of sites.</p>\n<p>Chrome automatically recognizes related website sets declared, accepted, and maintained in this open-source GitHub repository: <a href=\"https://github.com/GoogleChrome/related-website-sets\">Related Website Sets</a></p>\n<p>It provides access through Storage Access API directly without prompting for user approval, but only after the user interacts with the relevant iframe.</p>\n<p>It is important to declare a limited number of domains in related website sets that are meaningful and used for specific purposes. Google may block or suspend any exploitative use of this feature.</p>\n<p>The top-level site can also request approval for specific cross-site resources and scripts to Storage Access API using <code>resuestStorageAccessFor()</code> API.</p>\n<p>If you’re using an external identity provider for your web application, you can declare the domain of the identity provider in the related set to ensure limited third-party cookies and storage access to the identity provider, thus ensuring seamless user authentication.</p>\n<p>Related Website Sets can also work to supplement third-party cookie restrictions in web SSO and federated SSO if the number of web applications (or domains) is limited.</p>\n<h3 id=\"federated-credential-management-fedcm-api\" style=\"position:relative;\"><a href=\"#federated-credential-management-fedcm-api\" aria-label=\"federated credential management fedcm api permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Federated Credential Management (FedCM) API</h3>\n<p>FedCM API enables federated SSO without third-party cookies.</p>\n<p>With FedCM API, a user follows these steps for authentication:</p>\n<ol>\n<li>The User navigates to a Service Provider (SP) — aka., Relying Party (RP)</li>\n<li>As the user requests to authenticate, the SP requests the browser through FedCM API to initiate authentication.</li>\n<li>The browser displays a list of available identity providers (supported by the RP), such as social IdPs like Google, Apple, LinkedIn, and Facebook, or other OAuth IdPs like LoginRadius.</li>\n<li>Once the user selects an IdP, the browser communicates with the IdP. Upon valid authentication, the IdP generates a secure token.\nThe browser delivers this secure token to the RP to facilitate user authorization.</li>\n</ol>\n<p>You can access a user demo of FedCM here: <a href=\"https://fedcm-rp-demo.glitch.me/\">FedCM</a>. </p>\n<p>For more information about implementing federated SSO with FedCM API, go through the <a href=\"https://developers.google.com/privacy-sandbox/3pcd/fedcm-developer-guide\">FedCM developer guide</a>.</p>\n<h2 id=\"how-is-loginradius-preparing-for-the-third-party-cookie-phase-out\" style=\"position:relative;\"><a href=\"#how-is-loginradius-preparing-for-the-third-party-cookie-phase-out\" aria-label=\"how is loginradius preparing for the third party cookie phase out permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>How is LoginRadius Preparing for the Third-party Cookie Phase-out?</h2>\n<p>Firstly, we’re committed to solving our customers' user identity pain points — and preparing for the third-party cookies phase-out is no different.</p>\n<p>We’ll implement the most relevant and widely useful solutions to facilitate a smooth transition for our customers.</p>\n<p>Please subscribe to our blog for more information. We’ll update you on how we help with the third-party cookie phase-out.</p>\n<h2 id=\"in-conclusion\" style=\"position:relative;\"><a href=\"#in-conclusion\" aria-label=\"in conclusion permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>In Conclusion</h2>\n<p>The proposed changes to phase out third-party cookies and suggested alternatives are evolving as Google has been actively collaborating and discussing changes with the border community.</p>\n<p>Moreover, browsers like Firefox, Safari, and Edge may approach restricting third-party cookies differently than Google does.</p>\n<p>From LoginRadius, we’ll keep you updated on what we’re doing as a leading Customer Identity and Access Management (CIAM) vendor to prepare for the third-party cookie phase-out.</p>\n<h2 id=\"glossary\" style=\"position:relative;\"><a href=\"#glossary\" aria-label=\"glossary permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Glossary</h2>\n<p><strong>Top-level site</strong>: It is the primary site a user has visited.</p>\n<p><strong>First-party cookie</strong>: A cookie set by the top-level site.</p>\n<p><strong>Third-party cookie</strong>: A cookie set by a domain other than the top-level site. For example, let’s assume that a user has visited <code>a.com</code>, which might use an embed from <code>loginradius.com</code> to facilitate authentication. If <code>loginradius.com</code> sets a cookie when the user visits <code>a.com</code>, it is called a third-party cookie as the user hasn’t directly visited <code>loginradius.com</code>.</p>\n<h2 id=\"references\" style=\"position:relative;\"><a href=\"#references\" aria-label=\"references permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>References</h2>\n<ul>\n<li><a href=\"https://developers.google.com/privacy-sandbox/3pcd/prepare/prepare-for-phaseout\">Changes to Chrome's treatment of third-party cookies</a></li>\n<li><a href=\"https://developers.google.com/privacy-sandbox/3pcd/guides/identity\">Check the impact of the third-party cookie changes on your sign-in workflows</a></li>\n</ul>\n<style class=\"grvsc-styles\">\n  .grvsc-container {\n    overflow: auto;\n    -webkit-overflow-scrolling: touch;\n    padding-top: 1rem;\n    padding-top: var(--grvsc-padding-top, var(--grvsc-padding-v, 1rem));\n    padding-bottom: 1rem;\n    padding-bottom: var(--grvsc-padding-bottom, var(--grvsc-padding-v, 1rem));\n    border-radius: 8px;\n    border-radius: var(--grvsc-border-radius, 8px);\n    font-feature-settings: normal;\n  }\n  \n  .grvsc-code {\n    display: inline-block;\n    min-width: 100%;\n  }\n  \n  .grvsc-line {\n    display: inline-block;\n    box-sizing: border-box;\n    width: 100%;\n    padding-left: 1.5rem;\n    padding-left: var(--grvsc-padding-left, var(--grvsc-padding-h, 1.5rem));\n    padding-right: 1.5rem;\n    padding-right: var(--grvsc-padding-right, var(--grvsc-padding-h, 1.5rem));\n  }\n  \n  .grvsc-line-highlighted {\n    background-color: var(--grvsc-line-highlighted-background-color, transparent);\n    box-shadow: inset var(--grvsc-line-highlighted-border-width, 4px) 0 0 0 var(--grvsc-line-highlighted-border-color, transparent);\n  }\n  \n</style>","frontmatter":{"date":"July 08, 2024","updated_date":null,"description":"Google Chrome has planned to phase out third-party cookies, which will affect different website functionalities depending on third-party cookies. This blog focuses on how this phase-out affects identity and user authentication and discusses alternatives for overcoming challenges.","title":"How Chrome’s Third-Party Cookie Restrictions Affect User Authentication?","tags":["Identity","Cookies","Chrome"],"pinned":null,"coverImage":{"childImageSharp":{"fluid":{"aspectRatio":1.5037593984962405,"src":"/static/eb7396060c0adc430dbed2d04b63d431/ee604/third-party-cookies-phaseout-chrome.png","srcSet":"/static/eb7396060c0adc430dbed2d04b63d431/69585/third-party-cookies-phaseout-chrome.png 200w,\n/static/eb7396060c0adc430dbed2d04b63d431/497c6/third-party-cookies-phaseout-chrome.png 400w,\n/static/eb7396060c0adc430dbed2d04b63d431/ee604/third-party-cookies-phaseout-chrome.png 800w,\n/static/eb7396060c0adc430dbed2d04b63d431/f3583/third-party-cookies-phaseout-chrome.png 1200w","sizes":"(max-width: 800px) 100vw, 800px"}}},"author":{"id":"Raghunath Reddy","github":"raghunath-r-a","avatar":null}}}},"pageContext":{"limit":6,"skip":120,"currentPage":21,"type":"//engineering//","numPages":52,"pinned":"17fa0d7b-34c8-51c4-b047-df5e2bbaeedb"}},"staticQueryHashes":["1171199041","1384082988","2100481360","23180105","528864852"]}