{"id":147725,"date":"2024-02-15T14:25:04","date_gmt":"2024-02-15T14:25:04","guid":{"rendered":"https:\/\/randomnerdtutorials.com\/?p=147725"},"modified":"2024-03-15T16:24:40","modified_gmt":"2024-03-15T16:24:40","slug":"esp32-https-requests-sim-card-sim7000g","status":"publish","type":"post","link":"https:\/\/randomnerdtutorials.com\/esp32-https-requests-sim-card-sim7000g\/","title":{"rendered":"ESP32: Make HTTPS Requests using SIM Card &#8211; LILYGO T-SIM7000G"},"content":{"rendered":"\n<p>In this project, you&#8217;ll learn how to make HTTPS requests using an ESP32 with the SIM7000G LTE\/GPS\/GPRS module. We&#8217;ll use the LILYGO T-SIM7000G ESP32 that combines the ESP32 chip, the SIM7000G module, a microSD card slot, battery holder, and charger on the same board. We&#8217;ll show you how to connect it to the internet using your SIM card data plan and make an HTTPS GET request.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" fetchpriority=\"high\" decoding=\"async\" width=\"1200\" height=\"675\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2024\/02\/ESP32-Make-HTTPS-Requests-using-SIM-Card-LILYGO-T-SIM7000G.jpg?resize=1200%2C675&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"ESP32 Make HTTPS Requests using SIM Card LILYGO T-SIM7000G\" class=\"wp-image-147744\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2024\/02\/ESP32-Make-HTTPS-Requests-using-SIM-Card-LILYGO-T-SIM7000G.jpg?w=1280&amp;quality=100&amp;strip=all&amp;ssl=1 1280w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2024\/02\/ESP32-Make-HTTPS-Requests-using-SIM-Card-LILYGO-T-SIM7000G.jpg?resize=300%2C169&amp;quality=100&amp;strip=all&amp;ssl=1 300w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2024\/02\/ESP32-Make-HTTPS-Requests-using-SIM-Card-LILYGO-T-SIM7000G.jpg?resize=1024%2C576&amp;quality=100&amp;strip=all&amp;ssl=1 1024w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2024\/02\/ESP32-Make-HTTPS-Requests-using-SIM-Card-LILYGO-T-SIM7000G.jpg?resize=768%2C432&amp;quality=100&amp;strip=all&amp;ssl=1 768w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" \/><\/figure><\/div>\n\n\n<div class=\"wp-block-group rntbox rntclgray is-vertical is-layout-flex wp-container-core-group-is-layout-8cf370e7 wp-block-group-is-layout-flex\">\n<p><strong>Compatibility<\/strong><\/p>\n\n\n\n<p>This board supports 2G, LTE CAT-M1, and NB-IoT protocols. You can go to the following links to check if any of these protocols are supported in your country:<\/p>\n\n\n\n<p><a href=\"https:\/\/1nce.com\/en-eu\/1nce-connect\/our-coverage\/2g-network\" target=\"_blank\" rel=\"noopener\" title=\"\">Check network protocols supported in your country;<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/iotcreators.com\/network\/\" target=\"_blank\" rel=\"noopener\" title=\"\">Check NB-IoT providers in your country.<\/a><\/p>\n<\/div>\n\n\n\n<p><strong>Table of Contents<\/strong><\/p>\n\n\n\n<p>Throughout this tutorial, we&#8217;ll cover the following topics:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"#SIM7000G-ESP32-Intro\" title=\"\">Introducing the LILYGO T-SIM7000G ESP32<\/a><\/li>\n\n\n\n<li><a href=\"#apn-details\" title=\"\">Phone Provider APN Details<\/a><\/li>\n\n\n\n<li><a href=\"#installing-libraries\" title=\"\">Installing Libraries<\/a><\/li>\n\n\n\n<li><a href=\"#Preparing-the-LILYGO-T-SIM7000G-ESP32-Board\" title=\"\">Preparing the LILYGO T-SIM7000G ESP32 Board<\/a><\/li>\n\n\n\n<li><a href=\"#make-https-requests\" title=\"\">Make HTTPS Get Requests &#8211; LILYGO T-SIM7000G ESP32<\/a><\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"SIM7000G-ESP32-Intro\">Introducing the LILYGO T-SIM7000G ESP32<\/h2>\n\n\n\n<p>The LILYGO T-SIM7000G is an ESP32 development board with a SIM7000G chip. This adds GPS, GPRS, LTE CAT-M1, and NB-IoT protocols to your board. This means that with this board you can send SMS, get location and time using GPS, and connect it to the internet using a SIM card data plan. You can find more information by <a href=\"https:\/\/randomnerdtutorials.com\/lilygo-t-sim7000g-esp32-lte-gprs-gps\/\">reading our in-depth guide<\/a>.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" decoding=\"async\" width=\"750\" height=\"422\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2022\/08\/ESP32-TSIM7000G.jpg?resize=750%2C422&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"LILYGO T-SIM7000G ESP32\" class=\"wp-image-114209\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2022\/08\/ESP32-TSIM7000G.jpg?w=750&amp;quality=100&amp;strip=all&amp;ssl=1 750w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2022\/08\/ESP32-TSIM7000G.jpg?resize=300%2C169&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 750px) 100vw, 750px\" \/><\/figure><\/div>\n\n\n<p><strong>Where to buy LILYGO T-SIM7000G ESP32?<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/makeradvisor.com\/tools\/t-sim7000g-esp32\/\" target=\"_blank\" rel=\"noreferrer noopener\">LILYGO T-SIM7000G ESP32 (LTE, GPRS, and GPS) \u2013 Maker Advisor<\/a><\/li>\n<\/ul>\n\n\n<p>You can use the preceding links or go directly to <a href=\"https:\/\/makeradvisor.com\/tools\/?utm_source=rnt&utm_medium=post&utm_campaign=post\" target=\"_blank\">MakerAdvisor.com\/tools<\/a> to find all the parts for your projects at the best price!<\/p><p style=\"text-align:center;\"><a href=\"https:\/\/makeradvisor.com\/tools\/?utm_source=rnt&utm_medium=post&utm_campaign=post\" target=\"_blank\"><img data-recalc-dims=\"1\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2017\/10\/header-200.png?w=1200&#038;quality=100&#038;strip=all&#038;ssl=1\"><\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"apn-details\">APN Details<\/h2>\n\n\n\n<p>To connect your SIM card to the internet, you need to have your phone plan provider&#8217;s <strong>APN details<\/strong>. You need the domain name, username, and password.<\/p>\n\n\n\n<p>In my case, I\u2019m using Vodafone Portugal. If you search for&nbsp;&#8220;GPRS APN settings&#8221;&nbsp;followed by your phone plan provider name, (in my case: \u201cGPRS APN <strong>Vodafone Portugal<\/strong>\u201d), you can usually find in a forum or their website all the information that you need.<\/p>\n\n\n\n<p>It might be a bit tricky to find the details if you don\u2019t use a well-known provider. So, you might need to contact them directly.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"installing-libraries\">Libraries<\/h2>\n\n\n\n<p>The ESP32 communicates with the SIM7000G chip by sending AT commands via serial communication. You don&#8217;t need a library, you can simply establish a serial communication with the module and start sending AT commands. <\/p>\n\n\n\n<p>However, it might be more practical to use a library. For example, the <a href=\"https:\/\/github.com\/vshymanskyy\/TinyGSM\" target=\"_blank\" rel=\"noreferrer noopener\">TinyGSM<\/a> library knows which commands to send, and how to handle AT responses, and wraps that into the standard Arduino Client interface\u2014that&#8217;s the library we&#8217;ll use in this tutorial.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Installing the TinyGSM Library<\/h4>\n\n\n\n<p>Open your Arduino IDE and go to&nbsp;<strong>Sketch&nbsp;<\/strong>&gt;&nbsp;<strong>Include Library<\/strong>&nbsp;&gt;&nbsp;<strong>Manage Libraries<\/strong>. The Library Manager should open. Search for&nbsp;<strong>TinyGSM<\/strong>. Select the TinyGSM library by Volodymyr Shymanskyy.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" decoding=\"async\" width=\"278\" height=\"307\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2024\/02\/Arduino-IDE-2-Install-TinyGSM-Library-using-Libraries-Manager-1.png?resize=278%2C307&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"Arduino IDE 2 Install TinyGSM Library using Libraries Manager\" class=\"wp-image-147738\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2024\/02\/Arduino-IDE-2-Install-TinyGSM-Library-using-Libraries-Manager-1.png?w=278&amp;quality=100&amp;strip=all&amp;ssl=1 278w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2024\/02\/Arduino-IDE-2-Install-TinyGSM-Library-using-Libraries-Manager-1.png?resize=272%2C300&amp;quality=100&amp;strip=all&amp;ssl=1 272w\" sizes=\"(max-width: 278px) 100vw, 278px\" \/><\/figure><\/div>\n\n\n<h4 class=\"wp-block-heading\">Installing the ArduinoHttpClient Library<\/h4>\n\n\n\n<p>You also need to install the <strong>ArduinoHttpClient <\/strong>library to make HTTPS requests. Go to&nbsp;<strong>Sketch&nbsp;<\/strong>&gt;&nbsp;<strong>Include Library<\/strong>&nbsp;&gt;&nbsp;<strong>Manage Libraries<\/strong>, search for <strong>ArduinoHttpClient<\/strong>, and install it.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"281\" height=\"288\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2024\/02\/Arduino-IDE-2-Install-ArduinoHttpClient-Library-using-Libraries-Manager.png?resize=281%2C288&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"Arduino IDE 2 Install ArduinoHttpClient Library using Libraries Manager\" class=\"wp-image-147737\"\/><\/figure><\/div>\n\n\n<h2 class=\"wp-block-heading\" id=\"Preparing-the-LILYGO-T-SIM7000G-ESP32-Board\">Preparing the LILYGO T-SIM7000G ESP32 Board<\/h2>\n\n\n\n<div class=\"wp-block-group rntbox rntclgray is-vertical is-layout-flex wp-container-core-group-is-layout-8cf370e7 wp-block-group-is-layout-flex\">\n<p><strong>Compatibility<\/strong><\/p>\n\n\n\n<p>This board supports 2G, LTE CAT-M1, and NB-IoT protocols. You can go to the following links to check if any of these protocols are supported in your country:<\/p>\n\n\n\n<p><a href=\"https:\/\/1nce.com\/en-eu\/1nce-connect\/our-coverage\/2g-network\" target=\"_blank\" rel=\"noopener\" title=\"\">Check network protocols supported in your country;<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/iotcreators.com\/network\/\" target=\"_blank\" rel=\"noopener\" title=\"\">Check NB-IoT providers in your country.<\/a><\/p>\n<\/div>\n\n\n\n<p>Before testing your board, you need to follow the next two steps:<\/p>\n\n\n\n<p>1. Insert a nano SIM card;<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"422\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2022\/08\/nano-SIM-card-vodafone.jpg?resize=750%2C422&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"Nano SIM card vodafone\" class=\"wp-image-114211\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2022\/08\/nano-SIM-card-vodafone.jpg?w=750&amp;quality=100&amp;strip=all&amp;ssl=1 750w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2022\/08\/nano-SIM-card-vodafone.jpg?resize=300%2C169&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 750px) 100vw, 750px\" \/><\/figure><\/div>\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"422\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2024\/02\/SIM7000G-ESP32-SIM-Card-Connected.jpg?resize=750%2C422&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"SIM Card Connected to LILYGO T-SIM7000G ESP32\" class=\"wp-image-147740\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2024\/02\/SIM7000G-ESP32-SIM-Card-Connected.jpg?w=750&amp;quality=100&amp;strip=all&amp;ssl=1 750w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2024\/02\/SIM7000G-ESP32-SIM-Card-Connected.jpg?resize=300%2C169&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 750px) 100vw, 750px\" \/><\/figure><\/div>\n\n\n<p>2. Connect the Full Band LTE antenna to the correct antenna port as illustrated in the following image:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"422\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2024\/02\/SIM7000G-ESP32-Antenna.jpg?resize=750%2C422&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"Connect Band LTE Antenna LILYGO T-SIM7000G ESP32\" class=\"wp-image-147739\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2024\/02\/SIM7000G-ESP32-Antenna.jpg?w=750&amp;quality=100&amp;strip=all&amp;ssl=1 750w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2024\/02\/SIM7000G-ESP32-Antenna.jpg?resize=300%2C169&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 750px) 100vw, 750px\" \/><\/figure><\/div>\n\n\n<h2 class=\"wp-block-heading\" id=\"make-https-requests\">Make HTTPS Get Requests &#8211; LILYGO T-SIM7000G ESP32<\/h2>\n\n\n\n<p>In this sample sketch, the ESP32 will initialize the modem, establish an internet connection using the SIM card data plan, and will make an HTTPS GET request to the following URL:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/gist.githubusercontent.com\/RuiSantosdotme\/7db8537cef1c84277c268c76a58d07ff\/raw\/d3fe4cd6eff1ed43e6dbd1883ab7eba8414e2406\/gistfile1.txt\" target=\"_blank\" rel=\"noopener\" title=\"\">https:\/\/gist.githubusercontent.com\/RuiSantosdotme\/7db8537cef1c84277c268c76a58d07ff\/raw\/d3fe4cd6eff1ed43e6dbd1883ab7eba8414e2406\/gistfile1.txt<\/a><\/li>\n<\/ul>\n\n\n\n<p>The URL returns the following ASCII art text:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"944\" height=\"325\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2024\/02\/example-url-random-nerd-tutorials-logo.png?resize=944%2C325&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"example url random nerd tutorials logo\" class=\"wp-image-147729\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2024\/02\/example-url-random-nerd-tutorials-logo.png?w=944&amp;quality=100&amp;strip=all&amp;ssl=1 944w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2024\/02\/example-url-random-nerd-tutorials-logo.png?resize=300%2C103&amp;quality=100&amp;strip=all&amp;ssl=1 300w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2024\/02\/example-url-random-nerd-tutorials-logo.png?resize=768%2C264&amp;quality=100&amp;strip=all&amp;ssl=1 768w\" sizes=\"(max-width: 944px) 100vw, 944px\" \/><\/figure><\/div>\n\n\n<ol class=\"wp-block-list\">\n<li>Copy the following code to your Arduino IDE.<\/li>\n<\/ol>\n\n\n<pre style=\"max-height: 40em; margin-bottom: 20px;\"><code class=\"language-c\">\/*\n  Rui Santos\n  Complete project details at https:\/\/RandomNerdTutorials.com\/esp32-https-requests-sim-card-sim7000g\/\n  \n  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files.\n  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Based on the library example: github.com\/vshymanskyy\/TinyGSM\/blob\/master\/examples\/HttpsClient\/HttpsClient.ino\n*\/\n\n\/\/ Select your modem\n#define TINY_GSM_MODEM_SIM7000SSL\n#define TINY_GSM_RX_BUFFER 1024 \/\/ Set RX buffer to 1Kb\n\n\/\/ Set serial for debug console (to the Serial Monitor, default speed 115200)\n#define SerialMon Serial\n#define SerialAT Serial1\n\n#include &lt;TinyGsmClient.h&gt;\n#include &lt;ArduinoHttpClient.h&gt;\n\n\/\/ Define the serial console for debug prints, if needed\n#define TINY_GSM_DEBUG SerialMon\n\/\/ #define LOGGING  \/\/ &lt;- Logging is for the HTTP library\n\n\/\/ Add a reception delay, if needed.\n\/\/ This may be needed for a fast processor at a slow baud rate.\n\/\/ #define TINY_GSM_YIELD() { delay(2); }\n\n\/\/ set GSM PIN, if any\n#define GSM_PIN &quot;&quot;\n\n\/\/ flag to force SSL client authentication, if needed\n\/\/ #define TINY_GSM_SSL_CLIENT_AUTHENTICATION\n\n\/\/ Set your APN Details \/ GPRS credentials\nconst char apn[]      = &quot;&quot;;\nconst char gprsUser[] = &quot;&quot;;\nconst char gprsPass[] = &quot;&quot;;\n\n\/\/ Server details\nconst char server[]   = &quot;gist.githubusercontent.com&quot;;\nconst char resource[] = &quot;\/RuiSantosdotme\/7db8537cef1c84277c268c76a58d07ff\/raw\/d3fe4cd6eff1ed43e6dbd1883ab7eba8414e2406\/gistfile1.txt&quot;;\nconst int  port       = 443;\n\nTinyGsm        modem(SerialAT);\n\nTinyGsmClientSecure client(modem);\nHttpClient          http(client, server, port);\n\n\/\/ LilyGO T-SIM7000G Pinout\n#define UART_BAUD           115200\n#define PIN_DTR             25\n#define PIN_TX              27\n#define PIN_RX              26\n#define PWR_PIN             4\n\n#define SD_MISO             2\n#define SD_MOSI             15\n#define SD_SCLK             14\n#define SD_CS               13\n#define LED_PIN             12\n\nvoid modemPowerOn(){\n  pinMode(PWR_PIN, OUTPUT);\n  digitalWrite(PWR_PIN, LOW);\n  delay(1000);\n  digitalWrite(PWR_PIN, HIGH);\n}\n\nvoid modemPowerOff(){\n  pinMode(PWR_PIN, OUTPUT);\n  digitalWrite(PWR_PIN, LOW);\n  delay(1500);\n  digitalWrite(PWR_PIN, HIGH);\n}\n\nvoid modemRestart(){\n  modemPowerOff();\n  delay(1000);\n  modemPowerOn();\n}\n\nvoid setup() {\n  \/\/ Set Serial Monitor baud rate\n  SerialMon.begin(115200);\n  delay(10);\n\n  \/\/ Set LED OFF\n  pinMode(LED_PIN, OUTPUT);\n  digitalWrite(LED_PIN, HIGH);\n\n  modemPowerOn();\n\n  SerialMon.println(&quot;Wait...&quot;);\n\n  \/\/ Set GSM module baud rate and Pins\n  SerialAT.begin(UART_BAUD, SERIAL_8N1, PIN_RX, PIN_TX);\n  delay(6000);\n\n  \/\/ Restart takes quite some time\n  \/\/ To skip it, call init() instead of restart()\n  SerialMon.println(&quot;Initializing modem...&quot;);\n  modem.restart();\n  \/\/ modem.init();\n\n  String modemInfo = modem.getModemInfo();\n  SerialMon.print(&quot;Modem Info: &quot;);\n  SerialMon.println(modemInfo);\n\n  \/\/ Unlock your SIM card with a PIN if needed\n  if (GSM_PIN &amp;&amp; modem.getSimStatus() != 3) {\n    modem.simUnlock(GSM_PIN);\n  }\n\n  Serial.println(&quot;Make sure your LTE antenna has been connected to the SIM interface on the board.&quot;);\n  delay(10000);\n}\n\nvoid loop() {\n  modem.gprsConnect(apn, gprsUser, gprsPass);\n\n  SerialMon.print(&quot;Waiting for network...&quot;);\n  if (!modem.waitForNetwork()) {\n    SerialMon.println(&quot; fail&quot;);\n    delay(10000);\n    return;\n  }\n  SerialMon.println(&quot; success&quot;);\n\n  if (modem.isNetworkConnected()) {\n    SerialMon.println(&quot;Network connected&quot;);\n  }\n\n  SerialMon.print(F(&quot;Performing HTTPS GET request... &quot;));\n  http.connectionKeepAlive();  \/\/ Currently, this is needed for HTTPS\n  int err = http.get(resource);\n  if (err != 0) {\n    SerialMon.println(F(&quot;failed to connect&quot;));\n    delay(10000);\n    return;\n  }\n\n  int status = http.responseStatusCode();\n  SerialMon.print(F(&quot;Response status code: &quot;));\n  SerialMon.println(status);\n  if (!status) {\n    delay(10000);\n    return;\n  }\n\n  SerialMon.println(F(&quot;Response Headers:&quot;));\n  while (http.headerAvailable()) {\n    String headerName  = http.readHeaderName();\n    String headerValue = http.readHeaderValue();\n    SerialMon.println(&quot;    &quot; + headerName + &quot; : &quot; + headerValue);\n  }\n\n  int length = http.contentLength();\n  if (length &gt;= 0) {\n    SerialMon.print(F(&quot;Content length is: &quot;));\n    SerialMon.println(length);\n  }\n  if (http.isResponseChunked()) {\n    SerialMon.println(F(&quot;The response is chunked&quot;));\n  }\n\n  String body = http.responseBody();\n  SerialMon.println(F(&quot;Response:&quot;));\n  SerialMon.println(body);\n\n  SerialMon.print(F(&quot;Body length is: &quot;));\n  SerialMon.println(body.length());\n\n  \/\/ Shutdown\n  http.stop();\n  SerialMon.println(F(&quot;Server disconnected&quot;));\n\n  modem.gprsDisconnect();\n  SerialMon.println(F(&quot;GPRS disconnected&quot;));\n\n  \/\/ Do nothing forevermore\n  while (true) {\n    delay(1000);\n  }\n}\n<\/code><\/pre>\n\t<p style=\"text-align:center\"><a class=\"rntwhite\" href=\"https:\/\/github.com\/RuiSantosdotme\/Random-Nerd-Tutorials\/raw\/master\/Projects\/ESP32\/LILYGO_T-SIM7000G\/HTTPS_GET_Request_Basic.ino\" target=\"_blank\">View raw code<\/a><\/p>\n\n\n\n<ol start=\"2\"><li>Insert your SIM card pin, if you have it. In my case, I disabled the pin. <\/li><\/ol>\n\n\n\n<pre class=\"wp-block-code language-c\"><code>#define GSM_PIN \"\"<\/code><\/pre>\n\n\n\n<ol start=\"3\"><li>Insert your apn details on the following lines:<\/li><\/ol>\n\n\n\n<pre class=\"wp-block-code language-c\"><code>\/\/ Set your APN Details \/ GPRS credentials\nconst char apn&#091;]  = \"\";\nconst char gprsUser&#091;] = \"\";\nconst char gprsPass&#091;] = \"\";<\/code><\/pre>\n\n\n\n<p>For example, in my case:<\/p>\n\n\n\n<pre class=\"wp-block-code language-c\"><code>const char apn&#091;]  = \"net2.vodafone.pt\";\nconst char gprsUser&#091;] = \"vodafone\";\nconst char gprsPass&#091;] = \"vodafone\";<\/code><\/pre>\n\n\n\n<ol start=\"4\"><li>Go to <strong>Tools <\/strong>&gt; <strong>Board <\/strong>and select <strong>ESP32 Dev Module<\/strong>.<\/li><\/ol>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"670\" height=\"479\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2024\/02\/Arduino-IDE-2-Select-ESP32-Dev-Module-Board-and-COM-Port.png?resize=670%2C479&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"Arduino IDE 2 Select ESP32 Dev Module Board and COM Port\" class=\"wp-image-147733\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2024\/02\/Arduino-IDE-2-Select-ESP32-Dev-Module-Board-and-COM-Port.png?w=670&amp;quality=100&amp;strip=all&amp;ssl=1 670w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2024\/02\/Arduino-IDE-2-Select-ESP32-Dev-Module-Board-and-COM-Port.png?resize=300%2C214&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 670px) 100vw, 670px\" \/><\/figure><\/div>\n\n\n<ol start=\"5\"><li>Finally, upload the code to your board.<\/li><\/ol>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"41\" height=\"37\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2024\/02\/Arduino-2-Compile-and-Upload-Sketch-button.png?resize=41%2C37&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"Arduino IDE 2 Compile and Upload Sketch button\" class=\"wp-image-147731\"\/><\/figure><\/div>\n\n\n<p>Then, open the Serial Monitor at a baud rate of 115200. Press the on-board RST button to restart the board.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"37\" height=\"32\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2024\/02\/Arduino-2-Open-Serial-Monitor-Button.png?resize=37%2C32&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"Arduino IDE 2 Open Serial Monitor Button\" class=\"wp-image-147732\"\/><\/figure><\/div>\n\n\n<p>Wait some time until the board connects to the network (in my case, it may take up to 2 minutes). You should get something similar in your Serial Monitor\u2014see the picture below.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"1200\" height=\"755\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2024\/02\/Demonstration-ESP32-Make-HTTPS-Requests-using-SIM-Card-LILYGO-T-SIM7000G.png?resize=1200%2C755&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"Demonstration ESP32 Make HTTPS Requests using SIM Card LILYGO T-SIM7000G\" class=\"wp-image-147730\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2024\/02\/Demonstration-ESP32-Make-HTTPS-Requests-using-SIM-Card-LILYGO-T-SIM7000G.png?w=1355&amp;quality=100&amp;strip=all&amp;ssl=1 1355w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2024\/02\/Demonstration-ESP32-Make-HTTPS-Requests-using-SIM-Card-LILYGO-T-SIM7000G.png?resize=300%2C189&amp;quality=100&amp;strip=all&amp;ssl=1 300w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2024\/02\/Demonstration-ESP32-Make-HTTPS-Requests-using-SIM-Card-LILYGO-T-SIM7000G.png?resize=1024%2C645&amp;quality=100&amp;strip=all&amp;ssl=1 1024w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2024\/02\/Demonstration-ESP32-Make-HTTPS-Requests-using-SIM-Card-LILYGO-T-SIM7000G.png?resize=768%2C483&amp;quality=100&amp;strip=all&amp;ssl=1 768w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" \/><\/figure><\/div>\n\n\n<p>You can see that it identifies the SIM7000G module and connects to the network successfully. Finally, it establishes a connection to the example website, returns the &#8220;Random Nerd Tutorials&#8221; text and prints it in the response. If you see something similar in your Arduino IDE Serial Monitor, it means the code is running successfully.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">How the Code Works<\/h2>\n\n\n\n<p>Let&#8217;s take a quick look at the parts of the code that are relevant to this example.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">SIM Module<\/h3>\n\n\n\n<p>First, you need to define the module you&#8217;re using. The library is compatible with many different modules. To use the SIM7000G, include the following line:<\/p>\n\n\n\n<pre class=\"wp-block-code language-c\"><code>#define TINY_GSM_MODEM_SIM7000SSL<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Libraries<\/h3>\n\n\n\n<p>Include the <span class=\"rnthl rntliteral\">TinyGSM<\/span> and <span class=\"rnthl rntliteral\">ArduinoHttpClient<\/span> libraries.<\/p>\n\n\n\n<pre class=\"wp-block-code language-c\"><code>#include &lt;TinyGsmClient.h&gt;\n#include &lt;ArduinoHttpClient.h&gt;<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">APN Details<\/h3>\n\n\n\n<p>Insert the SIM card pin and APN details (in our case, it&#8217;s the following APN, user and pass):<\/p>\n\n\n\n<pre class=\"wp-block-code language-c\"><code>\/\/ set GSM PIN, if any\n#define GSM_PIN \"\"\n\n\/\/ Set your APN Details \/ GPRS credentials\nconst char apn&#091;]  = \"net2.vodafone.pt\";\nconst char gprsUser&#091;] = \"vodafone\";\nconst char gprsPass&#091;] = \"vodafone\";<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Server Domain and Resource<\/h3>\n\n\n\n<p>Define the <span class=\"rnthl rntliteral\">server<\/span> (domain name), <span class=\"rnthl rntliteral\">resource<\/span> (URL path), and <span class=\"rnthl rntliteral\">port<\/span> where you want to make the HTTPS GET request:<\/p>\n\n\n\n<pre class=\"wp-block-code language-c\"><code>\/\/ Server details\nconst char server&#091;]   = \"gist.githubusercontent.com\";\nconst char resource&#091;] = \"\/RuiSantosdotme\/7db8537cef1c84277c268c76a58d07ff\/raw\/d3fe4cd6eff1ed43e6dbd1883ab7eba8414e2406\/gistfile1.txt\";\nconst int  port       = 443;<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Initialize TinyGSMClient<\/h3>\n\n\n\n<p>Create a <span class=\"rnthl rntliteral\">TinyGsmClient<\/span> instance:<\/p>\n\n\n\n<pre class=\"wp-block-code language-c\"><code>TinyGsm modem(SerialAT);\n\nTinyGsmClientSecure client(modem);\n\nHttpClient http(client, server, port);<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">SIM7000G pinout<\/h3>\n\n\n\n<p>The following lines set the module baud rate and pinout:<\/p>\n\n\n\n<pre class=\"wp-block-code language-c\"><code>#define UART_BAUD   115200\n#define PIN_DTR     25\n#define PIN_TX      27\n#define PIN_RX      26\n#define PWR_PIN     4\n\n#define SD_MISO     2\n#define SD_MOSI     15\n#define SD_SCLK     14\n#define SD_CS       13\n#define LED_PIN     12<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Power the modem<\/h3>\n\n\n\n<p>In the <span class=\"rnthl rntliteral\">setup()<\/span>, you need to include the following instructions to turn on the modem:<\/p>\n\n\n\n<pre class=\"wp-block-code language-c\"><code>pinMode(PWR_PIN, OUTPUT);\ndigitalWrite(PWR_PIN, HIGH);\ndelay(300);\ndigitalWrite(PWR_PIN, LOW);<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Start Serial Communication<\/h3>\n\n\n\n<p>Start a serial communication with the modem:<\/p>\n\n\n\n<pre class=\"wp-block-code language-c\"><code>SerialAT.begin(UART_BAUD, SERIAL_8N1, PIN_RX, PIN_TX);<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Restart and Initialize the Modem<\/h3>\n\n\n\n<p>Call the following function to restart the modem:<\/p>\n\n\n\n<pre class=\"wp-block-code language-c\"><code>SerialMon.println(\"Initializing modem...\");\nmodem.restart();<\/code><\/pre>\n\n\n\n<p>You can also use the <span class=\"rnthl rntliteral\">modem.init()<\/span>. The difference between <span class=\"rnthl rntliteral\">restart()<\/span> and <span class=\"rnthl rntliteral\">init()<\/span> according to documentation: &#8220;<span class=\"rnthl rntliteral\">restart()<\/span> generally takes longer than <span class=\"rnthl rntliteral\">init()<\/span> but ensures the module doesn&#8217;t have lingering connections&#8221;.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Get Modem Info<\/h3>\n\n\n\n<p>You can use the <span class=\"rnthl rntliteral\">getModemInfo()<\/span> to get information about the modem.<\/p>\n\n\n\n<pre class=\"wp-block-code language-c\"><code>String modemInfo = modem.getModemInfo();\nSerialMon.print(\"Modem Info: \");\nSerialMon.println(modemInfo);<\/code><\/pre>\n\n\n\n<p>If you&#8217;re using the same model, it will print in the Arduino IDE Serial monitor the following information (SIM7000G):<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"215\" height=\"23\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2024\/02\/Demonstration-print-modem-info-ESP32-Make-HTTPS-Requests-SIM-Card-LILYGO-T-SIM7000G.png?resize=215%2C23&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"Demonstration print modem info ESP32 Make HTTPS Requests SIM Card LILYGO T-SIM7000G\" class=\"wp-image-147748\"\/><\/figure><\/div>\n\n\n<h3 class=\"wp-block-heading\">Unlock and Connect GPRS<\/h3>\n\n\n\n<p>If your SIM card has a pin, the next command will use the pin and unlock the card:<\/p>\n\n\n\n<pre class=\"wp-block-code language-c\"><code>if (GSM_PIN &amp;&amp; modem.getSimStatus() != 3) {\n  modem.simUnlock(GSM_PIN);\n}<\/code><\/pre>\n\n\n\n<p>Next, connect the GPRS using the APN details:<\/p>\n\n\n\n<pre class=\"wp-block-code language-c\"><code>modem.gprsConnect(apn, gprsUser, gprsPass);\n\nSerialMon.print(\"Waiting for network...\");\nif (!modem.waitForNetwork()) {\n  SerialMon.println(\" fail\");\n  delay(10000);\n  return;\n}\nSerialMon.println(\" success\");<\/code><\/pre>\n\n\n\n<p>To check if it is connected, you can use the <span class=\"rnthl rntliteral\">isNetworkConnected()<\/span> method:<\/p>\n\n\n\n<pre class=\"wp-block-code language-c\"><code>if (modem.isNetworkConnected()) {\n  SerialMon.println(\"Network connected\");\n}<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Perform the HTTPS GET Request<\/h3>\n\n\n\n<p>Making an HTTPS GET request is fairly easy using the <span class=\"rnthl rntliteral\">ArduinoHttpClient<\/span> library, you just need to call <span class=\"rnthl rntliteral\">http.get(resource)<\/span>.<\/p>\n\n\n\n<pre class=\"wp-block-code language-c\"><code>SerialMon.print(F(\"Performing HTTPS GET request... \"));\nhttp.connectionKeepAlive();  \/\/ Currently, this is needed for HTTPS\nint err = http.get(resource);\nif (err != 0) {\n  SerialMon.println(F(\"failed to connect\"));\n  delay(10000);\n  return;\n}<\/code><\/pre>\n\n\n\n<p>If the request is successful, it will print the <em>Response status code: 200<\/em> in your Serial Monitor.<\/p>\n\n\n\n<pre class=\"wp-block-code language-c\"><code>int status = http.responseStatusCode();\nSerialMon.print(F(\"Response status code: \"));\nSerialMon.println(status);\nif (!status) {\n  delay(10000);\n  return;\n}<\/code><\/pre>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"456\" height=\"26\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2024\/02\/Demonstration-Response-code-200-ESP32-Make-HTTPS-Requests-SIM-Card-LILYGO-T-SIM7000G.png?resize=456%2C26&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"Demonstration Response code 200 ESP32 Make HTTPS Requests SIM Card LILYGO T-SIM7000G\" class=\"wp-image-147745\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2024\/02\/Demonstration-Response-code-200-ESP32-Make-HTTPS-Requests-SIM-Card-LILYGO-T-SIM7000G.png?w=456&amp;quality=100&amp;strip=all&amp;ssl=1 456w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2024\/02\/Demonstration-Response-code-200-ESP32-Make-HTTPS-Requests-SIM-Card-LILYGO-T-SIM7000G.png?resize=300%2C17&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 456px) 100vw, 456px\" \/><\/figure><\/div>\n\n\n<p>The following snippet is for debugging purposes, it prints the response header and content length.<\/p>\n\n\n\n<pre class=\"wp-block-code language-c\"><code>SerialMon.println(F(\"Response Headers:\"));\nwhile (http.headerAvailable()) {\n  String headerName  = http.readHeaderName();\n  String headerValue = http.readHeaderValue();\n  SerialMon.println(\"    \" + headerName + \" : \" + headerValue);\n}\n\nint length = http.contentLength();\nif (length &gt;= 0) {\n  SerialMon.print(F(\"Content length is: \"));\n  SerialMon.println(length);\n}\nif (http.isResponseChunked()) {\n  SerialMon.println(F(\"The response is chunked\"));\n}<\/code><\/pre>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"670\" height=\"466\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2024\/02\/Demonstration-Response-Headers-length-ESP32-Make-HTTPS-Requests-SIM-Card-LILYGO-T-SIM7000G.png?resize=670%2C466&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"Demonstration Response Headers length ESP32 Make HTTPS Requests SIM Card LILYGO T-SIM7000G\" class=\"wp-image-147747\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2024\/02\/Demonstration-Response-Headers-length-ESP32-Make-HTTPS-Requests-SIM-Card-LILYGO-T-SIM7000G.png?w=670&amp;quality=100&amp;strip=all&amp;ssl=1 670w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2024\/02\/Demonstration-Response-Headers-length-ESP32-Make-HTTPS-Requests-SIM-Card-LILYGO-T-SIM7000G.png?resize=300%2C209&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 670px) 100vw, 670px\" \/><\/figure><\/div>\n\n\n<p>The response body is the actual interesting part of the response. The <span class=\"rnthl rntliteral\">String body<\/span> is what you can use to scrap some text or information from a website.<\/p>\n\n\n\n<pre class=\"wp-block-code language-c\"><code>String body = http.responseBody();\nSerialMon.println(F(\"Response:\"));\nSerialMon.println(body);\n\nSerialMon.print(F(\"Body length is: \"));\nSerialMon.println(body.length());<\/code><\/pre>\n\n\n\n<p>In this case, it&#8217;s just a sample project, so we&#8217;ve returned some characters saying &#8220;Random Nerd Tutorials&#8221; in ASCII art. In future projects, we&#8217;ll scrap useful information from websites. You can easily modify this example to get data from other website by changing the URL and resource.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"1200\" height=\"166\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2024\/02\/Demonstration-Response-ESP32-Make-HTTPS-Requests-SIM-Card-LILYGO-T-SIM7000G.png?resize=1200%2C166&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"Demonstration Response ESP32 Make HTTPS Requests SIM Card LILYGO T-SIM7000G\" class=\"wp-image-147746\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2024\/02\/Demonstration-Response-ESP32-Make-HTTPS-Requests-SIM-Card-LILYGO-T-SIM7000G.png?w=1310&amp;quality=100&amp;strip=all&amp;ssl=1 1310w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2024\/02\/Demonstration-Response-ESP32-Make-HTTPS-Requests-SIM-Card-LILYGO-T-SIM7000G.png?resize=300%2C41&amp;quality=100&amp;strip=all&amp;ssl=1 300w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2024\/02\/Demonstration-Response-ESP32-Make-HTTPS-Requests-SIM-Card-LILYGO-T-SIM7000G.png?resize=1024%2C141&amp;quality=100&amp;strip=all&amp;ssl=1 1024w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2024\/02\/Demonstration-Response-ESP32-Make-HTTPS-Requests-SIM-Card-LILYGO-T-SIM7000G.png?resize=768%2C106&amp;quality=100&amp;strip=all&amp;ssl=1 768w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" \/><\/figure><\/div>\n\n\n<p>Finally, stop the http connection and disconnect the GPRS modem from the Internet.<\/p>\n\n\n\n<pre class=\"wp-block-code language-c\"><code>http.stop();\nSerialMon.println(F(\"Server disconnected\"));\n\nmodem.gprsDisconnect();\nSerialMon.println(F(\"GPRS disconnected\"));<\/code><\/pre>\n\n\n\n<p>That&#8217;s it, those are the most relevant code parts of this sketch.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Wrapping Up<\/h2>\n\n\n\n<p>In this guide, you&#8217;ve learned how to use the LILYGO T-SIM7000G ESP32 board to perform HTTPS GET requests. This tutorial can also be applied if you&#8217;re using a &#8220;regular&#8221; ESP32 connected to an external SIM7000G module, just make sure you adjust the pinout definition if needed.<\/p>\n\n\n\n<p>With this sample sketch, you can connect GPRS to get some sample text from any website using an HTTPS GET request. In future guides, we&#8217;ll scrap useful information from websites or make API requests to get data or interact with web services.<\/p>\n\n\n\n<p>You may also like the following SIM7000G tutorials:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/randomnerdtutorials.com\/lilygo-t-sim7000g-esp32-lte-gprs-gps\/\">Getting Started with LILYGO T-SIM7000G ESP32 (LTE, GPRS, and GPS)<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/randomnerdtutorials.com\/lilygo-t-sim7000g-esp32-gps-data\/\">LILYGO T-SIM7000G ESP32: Get GPS Data (Latitude, Longitude, Altitude, and more)<\/a><\/li>\n<\/ul>\n\n\n\n<p>Learn more about the ESP32 with our resources:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/randomnerdtutorials.com\/learn-esp32-with-arduino-ide\/\">Learn ESP32 with Arduino IDE<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/randomnerdtutorials.com\/build-web-servers-esp32-esp8266-ebook\/\">Build Web Servers with ESP32 and ESP8266<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/randomnerdtutorials.com\/firebase-esp32-esp8266-ebook\/\">Firebase Web App with ESP32 and ESP8266<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/randomnerdtutorials.com\/projects-esp32\/\">Free ESP32 Projects and Tutorials<\/a><\/li>\n<\/ul>\n\n\n\n<p>Thanks for reading.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this project, you&#8217;ll learn how to make HTTPS requests using an ESP32 with the SIM7000G LTE\/GPS\/GPRS module. We&#8217;ll use the LILYGO T-SIM7000G ESP32 that combines the ESP32 chip, the &#8230; <\/p>\n<p class=\"read-more-container\"><a title=\"ESP32: Make HTTPS Requests using SIM Card &#8211; LILYGO T-SIM7000G\" class=\"read-more button\" href=\"https:\/\/randomnerdtutorials.com\/esp32-https-requests-sim-card-sim7000g\/#more-147725\" aria-label=\"Read more about ESP32: Make HTTPS Requests using SIM Card &#8211; LILYGO T-SIM7000G\">CONTINUE READING \u00bb<\/a><\/p>\n","protected":false},"author":1,"featured_media":147744,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[281,276,277,299,264,1],"tags":[],"class_list":["post-147725","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-esp32-project","category-esp32","category-esp32-arduino-ide","category-0-esp32","category-project","category-uncategorized"],"aioseo_notices":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2024\/02\/ESP32-Make-HTTPS-Requests-using-SIM-Card-LILYGO-T-SIM7000G.jpg?fit=1280%2C720&quality=100&strip=all&ssl=1","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/posts\/147725","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/comments?post=147725"}],"version-history":[{"count":10,"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/posts\/147725\/revisions"}],"predecessor-version":[{"id":148666,"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/posts\/147725\/revisions\/148666"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/media\/147744"}],"wp:attachment":[{"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/media?parent=147725"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/categories?post=147725"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/tags?post=147725"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}