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

# Get Connected Apps

> Get Connected Apps using the Stytch Vanilla JS SDK

`user.getConnectedApps()` wraps the [User Get Connected Apps](/api-reference/consumer/api/connected-apps/consent-management/get-connected-apps-user) API endpoint. The `user_id` will be automatically inferred from the logged-in user's session. This method retrieves a list of Connected Apps that the user has completed an authorization flow with successfully. If the user revokes a Connected App's access (e.g. via the `revokeConnectedApp` method) then the Connected App will no longer be returned in this endpoint's response.

## Response

<ResponseField name="connected_apps" type="array[objects]">
  An array of Connected Apps with which the User has successfully completed an authorization flow.

  <Expandable title="properties">
    <ResponseField name="connected_app_id" type="string">
      The ID of the Connected App.
    </ResponseField>

    <ResponseField name="name" type="string">
      The name of the Connected App.
    </ResponseField>

    <ResponseField name="description" type="string">
      A description of the Connected App.
    </ResponseField>

    <ResponseField name="client_type" type="string">
      The type of Connected App. Supported values are first\_party, first\_party\_public, third\_party, and third\_party\_public.
    </ResponseField>

    <ResponseField name="logo_url" type="string">
      The logo URL of the Connected App, if any.
    </ResponseField>

    <ResponseField name="scopes_granted" type="string">
      The scopes granted to the Connected App at the completion of the last authorization flow.
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="request_id" type="string">
  Globally unique UUID that is returned with every API call. This value is important to log for debugging purposes; we
  may ask for this value to help identify a specific API call when helping you debug an issue.
</ResponseField>

<ResponseField name="status_code" type="number">
  The HTTP status code of the response. Stytch follows standard HTTP response status code patterns, e.g. 2XX values
  equate to success, 3XX values are redirects, 4XX are client errors, and 5XX are server errors.
</ResponseField>

<Panel>
  <RequestExample>
    ```js theme={null}
    import { StytchClient } from '@stytch/vanilla-js';

    const stytch = new StytchClient('${publicToken}');

    export const listConnectedApps = async () => {
    const { connected_apps } = await stytch.user.getConnectedApps();
    connected_apps.forEach((app) => {
      console.log(`${app.name} (${app.connected_app_id})`);
    });
    };
    ```
  </RequestExample>

  <ResponseExample>
    ```json 200 theme={null}
    {
      "status_code": 200,
      "request_id": "request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141",
      "connected_apps": [
        {
          "client_type": "first_party",
          "connected_app_id": "connected-app-test-aeadeabc-a3a3-4796-83d0-b757e3001000",
          "description": "A first party connected app",
          "logo_url": null,
          "name": "first-party-confidential-app",
          "scopes_granted": "openid profile email"
        }
      ]
    }
    ```

    ```json 401 theme={null}
    {
      "status_code": 401,
      "request_id": "request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141",
      "error_type": "unauthorized_credentials",
      "error_message": "Unauthorized credentials.",
      "error_url": "https://stytch.com/docs/api/errors/401"
    }
    ```

    ```json 429 theme={null}
    {
      "status_code": 429,
      "request_id": "request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141",
      "error_type": "too_many_requests",
      "error_message": "Too many requests have been made.",
      "error_url": "https://stytch.com/docs/api/errors/429"
    }
    ```

    ```json 500 theme={null}
    {
      "status_code": 500,
      "request_id": "request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141",
      "error_type": "internal_server_error",
      "error_message": "Oops, something seems to have gone wrong, please reach out to support@stytch.com to let us know what went wrong.",
      "error_url": "https://stytch.com/docs/api/errors/500"
    }
    ```
  </ResponseExample>
</Panel>
