---
title: "Where to find your keys and IDs"
description: "Find your Project ID, API keys, identity keys and MCP server URL, and learn which one goes where."
url: https://help.gleap.ai/fr/articles/16751989-where-to-find-your-keys-and-ids
collection: "Developer guides"
updated: 2026-11-17
language: fr
alternates: [en]
---

# Where to find your keys and IDs

Find your Project ID, API keys, identity keys and MCP server URL, and learn which one goes where.

Gleap uses a handful of keys and IDs, and they're easy to mix up. This page lists each one, where it lives in the dashboard and what it's for. Every value belongs to one project, so open the right project first. The API keys and identity keys are on pages only project admins can open. API keys and the server API need the Team plan or higher.

### At a glance

<table style="min-width: 75px;"><colgroup><col style="min-width: 25px;"><col style="min-width: 25px;"><col style="min-width: 25px;"></colgroup><tbody><tr><th colspan="1" rowspan="1"><p>What</p></th><th colspan="1" rowspan="1"><p>Where</p></th><th colspan="1" rowspan="1"><p>Used for</p></th></tr><tr><td colspan="1" rowspan="1"><p>Project ID</p></td><td colspan="1" rowspan="1"><p><strong>Settings → Project → General</strong>, and the install pages under <strong>Settings → Widget → Install</strong></p></td><td colspan="1" rowspan="1"><p>Initialising the Gleap SDK in your website or app, and the <code>Project</code> header of API calls</p></td></tr><tr><td colspan="1" rowspan="1"><p>API keys</p></td><td colspan="1" rowspan="1"><p><strong>Settings → Developer → API keys</strong></p></td><td colspan="1" rowspan="1"><p>Every server route: the v3 API, the <code>/admin/…</code> and <code>/recordings/…</code> routes, the Segment destination and the Conversations API</p></td></tr><tr><td colspan="1" rowspan="1"><p>Identity keys</p></td><td colspan="1" rowspan="1"><p><strong>Settings → Security → Customer identity → Identity keys</strong></p></td><td colspan="1" rowspan="1"><p>Signing identity tokens on your server</p></td></tr><tr><td colspan="1" rowspan="1"><p>MCP server URL</p></td><td colspan="1" rowspan="1"><p><strong>Settings → Developer → MCP</strong></p></td><td colspan="1" rowspan="1"><p>Connecting Claude, Cursor, ChatGPT and other AI tools</p></td></tr></tbody></table>

### The Project ID

Every SDK is initialised with the Project ID, for example `Gleap.initialize("YOUR_PROJECT_ID")` on the web. API calls send it in the `Project` header. It identifies the project, not a user, so it's fine for it to sit in your website or app code.

1.  Go to **Settings → Project → General**.
    
2.  Copy the **Project ID**.
    

The install pages show it too. Go to **Settings → Widget → Install**, choose **Install myself** and pick your platform to get a setup snippet with the Project ID already filled in.

### API keys

API keys belong to service accounts. Requests made with a key act as that service account, and its name shows next to everything it does. One API key works for every server route: the v3 API (`Authorization: Bearer` header), the `/admin/…` and `/recordings/…` routes and the [Segment destination](https://help.gleap.ai/en/articles/360-send-segment-events-into-gleap.md) (`Api-Token` header or HTTP basic auth), and the Conversations API (server-to-server).

1.  Go to **Settings → Developer → API keys**.
    
2.  Click **Generate API key**.
    
3.  Give the service account a **Name**, and optionally an **Avatar**.
    
4.  Click **Create service account**.
    

The new key appears in the list with a copy button. If your workspace can use more than one data region, the same page shows a **Data region** row with the API host to call.

![API keys settings in a demo project. No credential is shown.](https://staticfiles.gleap.io/p613b5dd730aed737108f87ab/663KnZYvBmjfoym0gBfP2IEF1Om3AoDw4GXCNw6tW9tqsQkZ9W1anPmgMMqpW7iQSVRzUJoSiwa.png)

Send the API key and your Project ID with every v3 request:

```bash
curl https://api.gleap.io/v3/tickets \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Project: YOUR_PROJECT_ID"
```

Projects in the US region call `https://api.us.gleap.ai` instead. A key only works in its own project's region.

Keys that start with `grk_` still work and show in the list as **Older key**. New keys of that kind can't be created. The same page has the switch **Accept the project secret on the server API**, which is on by default for existing projects.

> **Warning:** API keys and identity keys are server-side secrets. Never put them in a website, app or public repository. Only the Project ID belongs in client code. Deleting an API key stops every request that uses it straight away.

### Identity keys

![Identity keys in the Customer identity settings of a demo project. No secret is shown.](https://staticfiles.gleap.io/p613b5dd730aed737108f87ab/13W6SDipOMGWC1JVktw61V9KPw3Nsu1CWEbP63FHlRig9qUplXS6Y8M9uDR059mb4OKLro3kev0.png)

Your server signs a short identity token for each logged-in user with an identity key, and your app passes it to the SDK with `setUserJwt`, so nobody can pose as one of your users. See [Identify users and send attributes and events](https://help.gleap.ai/en/articles/230-identify-users-and-send-attributes-and-events.md).

1.  Go to **Settings → Security → Customer identity → Identity keys** and click **Create key**.
    
2.  Give the key a label and pick the platform it may sign for.
    
3.  Copy the key ID and the secret. Gleap shows the secret once.
    

A project holds up to five identity keys. To rotate one, create a new key, switch your backend to it, then retire the old one. Code for each server language is in the developer guide [Customer identity](https://docs.gleap.ai/en/articles/709-customer-identity).

Each key shows when it was last used. Once the old key's date stops moving, **Revoke** it. Revoke at once if a secret leaks: tokens signed with that key stop working right away, and customers who signed in with it are signed out.

### How long a signed login lasts

This is a setting, not a key. With signed sessions on, **Signed login lasts** under **Settings → Security → Customer identity** sets how long a user stays signed in before the SDK asks your backend for a new token: 1 to 30 days, 7 by default. A shorter value also ends sessions that are already older. The JavaScript SDK option `sessionDuration` can make it shorter, never longer.

### The MCP server URL

Every project member can open **Settings → Developer → MCP**. The **Server URL** is the same for all projects in a region. AI tools that support sign-in connect with just the URL: you pick the project when you sign in, and the tool acts with your role. For a client without sign-in support, the page shows two headers to send instead, an API key and the project's **Internal ID**. The key then acts as its service account. See [Connect an AI assistant with the Gleap MCP server](https://help.gleap.ai/en/articles/369-connect-an-ai-assistant-with-the-gleap-mcp-server.md).

### Related

-   [Install the Gleap SDK](https://help.gleap.ai/en/articles/228-install-the-gleap-sdk.md)
    
-   [Identify users and send attributes and events](https://help.gleap.ai/en/articles/230-identify-users-and-send-attributes-and-events.md)
    
-   [Connect an AI assistant with the Gleap MCP server](https://help.gleap.ai/en/articles/369-connect-an-ai-assistant-with-the-gleap-mcp-server.md)
    
-   [Send Segment events into Gleap](https://help.gleap.ai/en/articles/360-send-segment-events-into-gleap.md)
    
-   [Roles and permissions](https://help.gleap.ai/en/articles/372-roles-and-permissions.md)
