---
title: "tractorbeam provider"
description: "Read and set the OAuth 2.0 app each provider's sign-in uses."
sidebar:
  label: "provider"
  order: 15
---

```sh
tractorbeam provider <subcommand> [flags]
```

## Shared flags

Every subcommand takes these flags.

| Flag | Description |
| --- | --- |
| `--config <string>` | The Project's `tractorbeam.config.ts`. Defaults to the one in the current directory or its nearest ancestor. |
| `--workspace <string>` | Workspace name. Environment variable: `TRACTORBEAM_WORKSPACE`. |
| `--origin <string>` | The Tractorbeam origin to call instead of the default, such as a proxy's. Environment variable: `TRACTORBEAM_ORIGIN`. |
| `--token <string>` | Access token. Defaults to the saved interactive session. Environment variable: `TRACTORBEAM_TOKEN`. |

## `provider set-oauth-app`

Set the OAuth 2.0 app the Workspace registered with a provider, for every sign-in to that provider. The client secret is typed at a hidden prompt in a terminal, and otherwise read from standard input. Run `tractorbeam provider get-oauth-app` first for the redirect URI to register.

```sh
tractorbeam provider set-oauth-app [flags] <provider>
```

| Argument | Description |
| --- | --- |
| `<provider>` | The provider's slug, as a Connector's provider names it, such as `hubspot`. |

| Flag | Description |
| --- | --- |
| `--client-id <string>` | The client ID of the OAuth 2.0 app the Workspace registered with the provider. Required. |

## `provider get-oauth-app`

Returns the OAuth 2.0 app the provider's sign-in uses: Tractorbeam's, or the Workspace's, with the redirect URI to register with the provider and the client ID set, if any. Returns 404 when the provider takes no sign-in, or when no Apply has committed a Connector naming it yet. Needs `connectors:read`.

```sh
tractorbeam provider get-oauth-app [flags] <provider>
```

| Argument | Description |
| --- | --- |
| `<provider>` | The provider's slug, as a Connector's `provider` names it, such as `hubspot`. |
