# Authenticate as an App

### About Authenticating as an ICR App

You must authenticate as an ICR App in order to make REST API requests as the application. For example, if you want to use the API to generate an installation access token for accessing organization resources, list installations across organizations for your app, or create new user / organization pairs with your app auto installed on the organization, you must authenticate as an app.

If a REST API endpoint requires you to authenticate as an app, the documentation for that endpoint will indicate that you must use a JWT to access the endpoint.&#x20;

### Using a JSON Web Token (JWT) to Authenticate as an ICR App

1. Generate a JSON Web Token (JWT) for your app. For more information, see "[Generating a JSON Web Token (JWT) for an ICR App.](/documentation/carbonregistry.com/api/apps/authentication/generate-a-jwt.md)"
2. Include the JWT in the `Authorization` header of your request. In the following example, replace `YOUR_JWT` with your JWT.&#x20;

{% tabs %}
{% tab title="Bash" %}

<pre class="language-bash"><code class="lang-bash">curl --request GET \
<strong>--url "https://api.carbonregistry.com/app/installations" \
</strong>--header "Authorization: Bearer YOUR_JWT"
</code></pre>

{% endtab %}

{% tab title="Javascript" %}

```typescript
await axios.get(
`https://api.carbonregistry/app/installations`,
{
  headers: {
    Authorization: `Bearer ${YOUR_JWT}`,
    },
  },
)
```

{% endtab %}
{% endtabs %}


---

# 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://documentation.carbonregistry.com/documentation/carbonregistry.com/api/apps/authentication/authenticate-as-an-app.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.
