> ## Documentation Index
> Fetch the complete documentation index at: https://docs.occtoo.com/llms.txt
> Use this file to discover all available pages before exploring further.

# applicationById

> Gets an application made with `createApplication` by its global id. Fails with `NotFoundError` when no such application has it.



**query** `applicationById(id: ID!): Application!`

## Arguments

**`id`**: `ID!` (required)

Global id of the application (`Application.id`).

## Returns

`Application!`

**`accessToken`**: `ApplicationAccessToken!`

New bearer token for the version's API, issued to this application on every read. Send it when the version is `PROTECTED`.

---

**`apiVersionId`**: `UUID!`

Raw id (a UUID) of the API version the application calls. `apiVersionById` takes the global `ApiVersion.id`.

---

**`clientId`**: `String`

Client id of the application's credentials. Null when it has none.

---

**`clientSecret`**: `String!`

Client secret that goes with `clientId`. Keep it private.

---

**`createdAt`**: `DateTime!`

When the application was created (UTC).

---

**`createdBy`**: `UUID`

Id of the user or application that created the application.

---

**`displayName`**: `String!`

Name of the application.

---

**`etag`**: `Etag`

Version tag for optimistic concurrency. Pass back the value you last read when you change the item.

---

**`id`**: `ID!`

Global id of the application. `applicationById` and the application mutations take it; `applicationById` finds only applications made with `createApplication`.

---

**`lastModifiedAt`**: `DateTime!`

When the application last changed (UTC).

---

**`lastUpdatedBy`**: `UUID`

Id of the user or application that last changed the item. Null if not recorded.

---

**`tags`**: `[String!]!`

Labels for grouping and filtering applications.

## Examples

```graphql Query
query ApplicationById($id: ID!) {
  applicationById(id: $id) {
    accessToken {
      expiresIn
      token
    }
    apiVersionId
    clientId
    clientSecret
    createdAt
    createdBy
  }
}
```

```json Variables
{
  "id": "id"
}
```

```json Response
{
  "data": {
    "applicationById": {
      "accessToken": {
        "expiresIn": 1,
        "token": "string"
      },
      "apiVersionId": "value",
      "clientId": "string",
      "clientSecret": "string",
      "createdAt": "value",
      "createdBy": "value"
    }
  }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.