# Using Developer Tools

Insomnia and Postman are API request IDEs and a sample collection is provided for both tools to get you started. Insomnia also has a remote.it plugin available to assist with authentication to allow you to experiment before you develop code.

\
For graphQL, you can explore the schema, generate queries and mutations.\
For the REST-API, you can create http requests.

## Insomnia Set Up

### Download and Install Insomnia

{% embed url="<https://insomnia.rest/>" %}

It is recommended that you install Insomnia Core rather than Insomnia Designer, but the plugin should work for both versions.

### Add the Plugin to Insomnia

We will be using a remote.it provided plugin to create queries which will automatically sign the requests.

Go to preferences:

![](/files/-M_vMHwNHA2JpjNFBznA)

Enter insomnia-plugin-remoteit and click *Install Plugin*

### Remote.it Insomnia Collection

We have developed an example set of GraphQL queries and mutations in a collection that you can import directly into insomnia to get started. You will still need to install the authentication plug-in [here](#add-the-plugin-to-insomnia) and [create your access keys](/developer-tools/api/usage/access-keys.md) in your account before getting started.

{% embed url="<https://raw.githubusercontent.com/remoteit/code_samples/refs/heads/main/api_tools/Remoteit_Prod_Insomnia.json>" %}
Remote.It Insomnia Collection
{% endembed %}

You can download all our examples here:

```
$ git clone https://github.com/remoteit/code_samples.git
```

The collection is found in the api\_tools folder.

Here is a quick overview of the UI once you have imported the collection

<figure><img src="/files/xl38waV8HsA6F6NhXpip" alt=""><figcaption></figcaption></figure>

{% hint style="warning" %}
If you want to start using the API requests in your code, you cannot use the generated code out of Insomnia as the generated signature is only good for that specific request. You will need to use the http request signing methodology. Some examples can be found on the [authentication page](/developer-tools/authentication.md#examples).
{% endhint %}

### Building a graphQL request on your  own

Make sure to create a ***POST*** request and select ***GraphQL Query*** as Body type. NOTE: All graphQL queries and mutations are made with **POST**

You can type a sample GraphQL query to <https://api.remote.it/graphql/v1> like:

```
{
  login {
    email
  }
}
```

If you haven't already set up your machine with the credentials file, see [here](/developer-tools/authentication.md) and do so now.

Select the ***Auth*** tab of the query and select ***Bearer Token*** authentication.&#x20;

![](/files/SPwKhPTYAhCjPSJcTnmI)

Click on th&#x65;***Token*** field and `CTRL+Space`to select the ***remote.it API authentication*** tag, and select a specific profile otherwise the default profile will be used.&#x20;

![](/files/oc8MafjYGD9ybBkJGUkp)

You now can send the request and execute the query using the credentials stored earlier.

### Using graphQL in your application

Once you have your query or your mutation working as you expect, then you can work to integrate it into your application. Examples of request signing can be found [here](/developer-tools/authentication.md#api-request-signing).

## Postman Set Up

### Download and Install Postman

{% embed url="<https://www.postman.com>" %}
These instructions have been written using Version 11.2.1
{% endembed %}

### Remote.it Postman Collection

We have developed an example set of GraphQL queries and mutations in a collection that you can import directly into Postman to get started. Be sure to set up your environment variables before using these.

```
$ git clone https://github.com/remoteit/code_samples.git
```

The collection is found in the api\_tools folder

#### Import the environment and collection

You will need to import both the environment file and the collection file.

Update the environment variable values (R3\_ACCESS\_KEY\_ID, R3\_DEVELOPER\_API\_KEY, and R3\_SECRET\_ACCESS\_KEY) retrieved from your [credentials file](https://docs.remote.it/developer-tools/api/pages/-M_b0yOVV0jMMRYgCl2N#create-a-remote.it-credentials-file) into the Current value field and then **"Save"** at the top of the variables list.

<figure><img src="/files/SbBO0LMH9nwJC4DsAUl3" alt=""><figcaption></figcaption></figure>

This is a quick overview of the UI. Please refer to the Postman documentation if yours doesn't look the same as versions may change.

<figure><img src="/files/owrLCGJnAMRxYIbOkKbg" alt=""><figcaption></figcaption></figure>

{% hint style="warning" %}
If you want to start using the API requests in your code, you cannot use the generated code out of Insomnia as the generated signature is only good for that specific request. You will need to use the http request signing methodology. Some examples can be found on the [authentication page](/developer-tools/authentication.md#examples).
{% endhint %}

### Building a graphQL request on your  own

A Pre-request Script is required which handles the request signing. The script can be found in the Collection, under the main folder. Any new requests that you create under this collection should inherit this script.

<figure><img src="/files/0PXZNfezco4ZARxcBGGs" alt=""><figcaption></figcaption></figure>

Make sure to create any new request as a ***POST*** request and select ***GraphQL Query*** as Body type.  and use your variable for the url. NOTE: All graphQL queries and mutations are made with **POST**

You can type a sample GraphQL query to <https://api.remote.it/graphql/v1> like:

```
{
  login {
    email
  }
}
```

If you haven't already set up your machine with the credentials file, see [here](/developer-tools/authentication.md) and do so now.

### Using graphQL in your application

Once you have your query or your mutation working as you expect, then you can work to integrate it into your application. Examples of request signing can be found [here](/developer-tools/authentication.md#api-request-signing).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.remote.it/developer-tools/api/using-developer-tools.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
