# ChatGPT

Canonical HTML: https://p-hatan.com/deeplink-x/apps/chatgpt/

DeeplinkX 1.5.8.

## Platforms and setup

Native platforms: **ios, android, windows**.



## Public actions

### ChatGPT.open


```dart
factory ChatGPT.open({final bool fallbackToStore = false})
```

Launch with `DeeplinkX.launchApp`. Native platforms: **ios, android, windows**. Action web fallback: **available**. Store-fallback flag: **supported; opt in explicitly**.

| Parameter | Type | Required | Default |
| --- | --- | --- | --- |
| `fallbackToStore` | `bool` | No | `false` |

[Exact source](https://github.com/DeepLinkX/DeeplinkX/blob/00d9d2c7c1affe4e2ee459a01afeba82a1480eac/lib/src/apps/downloadable_apps/chatgpt.dart#L11)

### ChatGPT.openSharedConversation


```dart
static ChatGPTOpenSharedConversationAction openSharedConversation({ required final String shareId, final bool fallbackToStore = false, })
```

Launch with `DeeplinkX.launchAction`. Native platforms: **ios, android, windows**. Action web fallback: **available**. Store-fallback flag: **supported; opt in explicitly**.

| Parameter | Type | Required | Default |
| --- | --- | --- | --- |
| `shareId` | `String` | Yes | — |
| `fallbackToStore` | `bool` | No | `false` |

[Exact source](https://github.com/DeepLinkX/DeeplinkX/blob/00d9d2c7c1affe4e2ee459a01afeba82a1480eac/lib/src/apps/downloadable_apps/chatgpt.dart#L46)

### ChatGPT.openGpt


```dart
static ChatGPTOpenGptAction openGpt({ required final String gptId, final bool fallbackToStore = false, })
```

Launch with `DeeplinkX.launchAction`. Native platforms: **ios, android, windows**. Action web fallback: **available**. Store-fallback flag: **supported; opt in explicitly**.

| Parameter | Type | Required | Default |
| --- | --- | --- | --- |
| `gptId` | `String` | Yes | — |
| `fallbackToStore` | `bool` | No | `false` |

[Exact source](https://github.com/DeepLinkX/DeeplinkX/blob/00d9d2c7c1affe4e2ee459a01afeba82a1480eac/lib/src/apps/downloadable_apps/chatgpt.dart#L56)


## Provider setup and examples
DeeplinkX supports opening ChatGPT and stable ChatGPT web links on Android, iOS, and Windows.

## Available Actions

### Launch ChatGPT

```dart
final deeplinkX = DeeplinkX();

await deeplinkX.launchApp(ChatGPT.open());
await deeplinkX.launchApp(ChatGPT.open(fallbackToStore: true));
await deeplinkX.launchApp(ChatGPT.open(), disableFallback: true);
```

### Open a Shared Conversation

```dart
await deeplinkX.launchAction(
  ChatGPT.openSharedConversation(shareId: 'abc123', fallbackToStore: true),
);
```

### Open a GPT

```dart
await deeplinkX.launchAction(
  ChatGPT.openGpt(gptId: 'g-abc123', fallbackToStore: true),
);
```

## Platform Configuration

### iOS

Add the ChatGPT scheme to `ios/Runner/Info.plist`:

```xml
<key>LSApplicationQueriesSchemes</key>
<array>
    <string>chatgpt</string>
</array>
```

### Android

Add the ChatGPT package to `<queries>` in `android/app/src/main/AndroidManifest.xml`:

```xml
<package android:name="com.openai.chatgpt" />
```

## Link Formats

- Open app: `chatgpt://`
- Shared conversation: `https://chatgpt.com/share/{shareId}`
- GPT: `https://chatgpt.com/g/{gptId}`

## Fallback Behavior

1. DeeplinkX opens ChatGPT when installed.
2. If ChatGPT is not installed and `fallbackToStore` is `true`, DeeplinkX redirects to Google Play, the iOS App Store, or the Microsoft Store.
3. If store fallback is disabled or unavailable, DeeplinkX opens the matching ChatGPT web URL.
4. Disable all fallbacks with `disableFallback: true`.

## Fallback Support Matrix

| Action               | Store Fallback | Web Fallback |
| -------------------- | -------------- | ------------ |
| Open app             | Yes            | Yes          |
| Open shared conversation | Yes        | Yes          |
| Open GPT             | Yes            | Yes          |

## Check If ChatGPT Is Installed

```dart
final deeplinkX = DeeplinkX();
final isInstalled = await deeplinkX.isAppInstalled(ChatGPT());
```

