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

> ## Agent Instructions
> Use Stable documentation by default. Honor an explicit Beta request or a URL under /docs/beta/. If the requested version conflicts with the installed CLI package or API origin, clarify the target before writing integration code.
> Pages under /docs/beta/ document Beta; other product pages document Stable. Keep the CLI package, commands, API origin, and credentials within the selected version. State the documentation version in your answer.
> For MCP search, always pass version: Stable or version: Beta. Unfiltered search mixes both versions. For filesystem reads, keep Beta queries under /beta/ and exclude /beta/ from Stable queries; discover paths before reading them.
> The public docs base is https://photon.codes/docs. Convert MCP page paths to public URLs under that base, preserving /beta/ when present. Read https://photon.codes/docs/skill.md for version selection and https://photon.codes/docs/llms.txt for the version indexes.

# Redeem installation credential

> Redeem installation credential: redeemAppInstallationDelivery in the TypeScript, Python and Rust clients.

`POST /v1/installation-requests/redeem`

The registered app backend authenticates with a signed client assertion and a single-use code. Plaintext is returned only once; retries return status and never create another credential.

<Tabs>
  <Tab title="TypeScript">
    ```typescript TypeScript theme={null}
    photon.system.redeemAppInstallationDelivery(input: RedeemAppInstallationDeliveryInput, options?: RequestOptions): Promise<RedeemAppInstallationDeliveryOutput>
    ```
  </Tab>

  <Tab title="Python">
    ```python Python theme={null}
    photon.system.redeem_app_installation_delivery(input: RedeemAppInstallationDeliveryInput) -> models.RedeemAppInstallationDeliveryResponse
    ```
  </Tab>

  <Tab title="Rust">
    ```rust Rust theme={null}
    client.redeem_app_installation_delivery(body: &types::RedeemAppInstallationDeliveryRequest).await -> Result<ResponseValue<types::RedeemAppInstallationDeliveryResponse>, Error<RedeemAppInstallationDeliveryError>>
    ```
  </Tab>
</Tabs>

<RequestExample>
  ```typescript TypeScript theme={null}
  import { Photon } from "@photon-ai/api";

  const photon = new Photon();
  const result = await photon.system.redeemAppInstallationDelivery({
    body: {
      appId: "appId",
      clientAssertion: "clientAssertion",
      code: "code",
    },
  });
  ```

  ```python Python theme={null}
  from photon_api import Photon
  from photon_api.rpc_generated import RedeemAppInstallationDeliveryInput

  photon = Photon()
  result = photon.system.redeem_app_installation_delivery(
      RedeemAppInstallationDeliveryInput.model_validate({
          "body": {
              "appId": "appId",
              "clientAssertion": "clientAssertion",
              "code": "code",
          },
      })
  )
  ```

  ```rust Rust theme={null}
  use photon_ai_api::PhotonClientBuilder;

  let client = PhotonClientBuilder::new().build()?;
  let result = client
      .redeem_app_installation_delivery(
          &serde_json::from_value(serde_json::json!({
              "appId": "appId",
              "clientAssertion": "clientAssertion",
              "code": "code",
          }))?,
      )
      .await
      .map_err(|error| format!("{error:?}"))?
      .into_inner();
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "clientId": "string",
    "clientSecret": "string",
    "installationId": "string",
    "status": "created"
  }
  ```
</ResponseExample>

## Body

<ParamField body="appId" type={"string"} required />

<ParamField body="clientAssertion" type={"string"} required />

<ParamField body="code" type={"string"} required />

## Returns

**`200`** First successful delivery or metadata-only operation status. RedeemAppInstallationDeliveryResponse

**One of: CreatedAppInstallationDelivery**

<ResponseField name="clientId" type={"string"} required />

<ResponseField name="clientSecret" type={"string"} required />

<ResponseField name="installationId" type={"string"} required />

<ResponseField name="status" type={"\"created\""} required />

**One of: ExistingAppInstallationDelivery**

<ResponseField name="installationId" type={"string"} required />

<ResponseField name="status" type={"ExistingAppInstallationDeliveryStatus"} required />


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