# GET Request

Test Soracom Beam with an HTTP GET request.

Use Beam's [HTTP entry point](https://docs.soracom.io/en/services/beam/http) and Soracom's [HTTPS test server](https://docs.soracom.io/en/services/beam/test-servers) to verify how Beam forwards GET requests.

![GET request flow via Beam to HTTPS test server](https://docs.soracom.io/_astro/beam-get.DA_3L6Jp_Z1tkFht.webp)

No special setup is required to use the HTTPS test server. In this tutorial, you will add an HTTP entry point configuration and send a GET request from your device.

> [!NOTE]
>
> Unified Endpoint does not support GET requests. Sending a GET request such as `curl http://uni.soracom.io` returns HTTP status code `405 Method Not Allowed`.

The device sends GET requests to the Beam HTTP entry point (`http://beam.soracom.io:8888`). The device does not need to know the HTTPS test server URL.

## Configuring HTTP Entry Point

Add an HTTP entry point configuration to your SIM group and assign your IoT SIM to the group.

> [!WARNING]
>
> Beam settings are configured at the group level. For more information about groups, see [Groups](https://docs.soracom.io/en/services/groups).

1. In the SIM group settings screen, choose a group, then select **Soracom Beam**.

   For detailed instructions on how to open the SIM Group settings screen, see [Group Settings](https://docs.soracom.io/en/services/groups/settings).

2. Click **+ Add Configuration**▾ and select **HTTP entry point**.

   The Soracom Beam - HTTP configuration screen appears.

3. Configure the following settings:

   | Item | Value |
   | - | - |
   | **Configuration name** | Enter any name. Example: `http over ssl` |
   | **Entry point** > **Path** | Enter `/`. |
   | **Destination** > **Protocol** | Select `HTTPS`. |
   | **Destination** > **Host name** | Enter `beamtest.soracom.io`. |
   | **Destination** > **Port number** | Leave blank. |
   | **Destination** > **Path** | Enter `/`. |
   | **Client Certificate** | Leave off. |
   | **Header manipulations** > **IMSI Header** | Turn on. |
   | **Header manipulations** > **SIM ID Header** | Turn on. |

   For more information about HTTP entry point settings, see [HTTP Entry Point](https://docs.soracom.io/en/services/beam/http).

4. Click **Save**.

5. [Assign your IoT SIM to the group](https://docs.soracom.io/en/services/groups/usage#managing-devices).

   Beam configuration is now complete.

## Sending a GET Request from Your Device

GET requests sent to the HTTP entry point are forwarded through Beam to the HTTPS test server. The test server processes the HTTP headers and returns a response containing the header information.

> [!WARNING]
>
> Beam charges are incurred per request. A free tier is available. For more information, see [Soracom Beam Pricing](https://docs.soracom.io/en/pricing#soracom-beam).

1. From a device using an IoT SIM configured with the HTTP entry point, send a GET request to the HTTP entry point (`http://beam.soracom.io:8888`).

   GET request example:

   ```bash
   curl http://beam.soracom.io:8888
   ```

   Response:

   ```json
   {
     "message": "Hello SORACOM Beam Client",
     "headers": {
       "X-Soracom-Imsi": "295050012345678",
       "X-Soracom-Sim-Id": "8942310000012345678"
     },
     "log": {
       "preSharedKey": "",
       "stringToSign": "",
       "calculatedSignature": "",
       "providedSignature": "",
       "trails": null
     }
   }
   ```

> [!WARNING]
>
> If the request does not work as expected, check the error logs. For more information, see [Soracom Beam Errors](https://docs.soracom.io/en/services/beam/error-logs).

### Understanding the Response

The response is generated by the HTTPS test server. The `message` field contains a greeting from the test server. The `headers` object shows supported Soracom headers that were added by Beam based on the enabled header options in the **Header manipulations** section of your group configuration. In this example, IMSI and SIM ID headers are enabled. The HTTPS test server returns only predefined Soracom headers and does not include custom headers configured in Beam.

If you turn off the **IMSI Header** and **SIM ID Header** options, then send a GET request, the response displays:

```json
{
  "message": "Hello unknown client ...",
  "headers": {},
  "log": {
    "preSharedKey": "",
    "stringToSign": "",
    "calculatedSignature": "",
    "providedSignature": "",
    "trails": null
  }
}
```

## Disabling Beam Configuration

Beam charges are incurred per request. If you are not using Beam, disable the entry point configuration or remove the IoT SIM from the group.

- To stop forwarding requests via Beam, open your SIM group settings and disable or delete the HTTP entry point configuration.
- To remove an IoT SIM from a group, see [Removing a Device from a Group](https://docs.soracom.io/en/services/groups/usage#removing-a-device-from-a-group).
