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

# Creating your OAuth client

> Where the client ID and secret that adding an account asks for come from, one Google screen at a time.

When you go to add a Google account to the hub, you get this.

<Frame>
  <img src="https://mintcdn.com/mcp-hub/_5S572FR3uaOuoK1/assets/install/add-account-form.png?fit=max&auto=format&n=_5S572FR3uaOuoK1&q=85&s=03afa2f7a1420128c2c8a4f31a1acda8" alt="The add account screen, with fields for an OAuth client ID and secret" width="1840" height="2070" data-path="assets/install/add-account-form.png" />
</Frame>

An **OAuth client ID** and an **OAuth client secret**. Both come from Google,
and this page is how you get them.

## What it is, and why you have to make it

For the hub to read your Gmail, it has to prove to Google that you allowed it
to. The OAuth client is that proof.

We cannot make it for you. Google offers no way to create one automatically, so
it has to be done in your own account, in the console. In return the client
lives **inside your own project**. We never see it and never hold it.

You make it once. Several accounts can share one client.

<Note>
  Allow about ten minutes. The installer's **Create your OAuth client** card has
  a button for each step that opens the right console page, so you never have to
  go looking for one.
</Note>

## 1. Set up the consent screen

The consent screen is what Google shows when you connect an account, listing
what is being asked for. It has to exist before a client can.

<Steps>
  <Step title="Get started">
    The installer's **Open consent screen** button lands you here. Press
    **Get started**.

    <Frame>
      <img src="https://mintcdn.com/mcp-hub/tAnjNBsB0ibYi6P4/assets/oauth/01-not-configured.png?fit=max&auto=format&n=tAnjNBsB0ibYi6P4&q=85&s=2f875748f5ec22cc760e84f1f69c9538" alt="Google Auth Platform saying it is not configured yet, with a Get started button" width="1010" height="560" data-path="assets/oauth/01-not-configured.png" />
    </Frame>
  </Step>

  <Step title="Name it, and give an address">
    **App name** is for your own benefit. It is the name you will see when you
    connect an account. **User support email** is a dropdown; pick your own.

    <Frame>
      <img src="https://mintcdn.com/mcp-hub/tAnjNBsB0ibYi6P4/assets/oauth/02-app-info.png?fit=max&auto=format&n=tAnjNBsB0ibYi6P4&q=85&s=7dae2146b694ba127df3862fc10e192b" alt="The first step, asking for an app name and a support email" width="1010" height="700" data-path="assets/oauth/02-app-info.png" />
    </Frame>
  </Step>

  <Step title="Choose External">
    Choose **External**. Internal restricts it to your organization, which
    would stop you connecting a personal Gmail account at all.

    <Frame>
      <img src="https://mintcdn.com/mcp-hub/tAnjNBsB0ibYi6P4/assets/oauth/03-audience.png?fit=max&auto=format&n=tAnjNBsB0ibYi6P4&q=85&s=b4f042127e813aef0d92e641862408e2" alt="Internal and External, with External selected" width="1010" height="900" data-path="assets/oauth/03-audience.png" />
    </Frame>

    It says the app starts in testing mode. The next section deals with that.
  </Step>

  <Step title="Contact email">
    Your address again. This is where Google writes if something about the
    project changes.

    <Frame>
      <img src="https://mintcdn.com/mcp-hub/tAnjNBsB0ibYi6P4/assets/oauth/04-contact.png?fit=max&auto=format&n=tAnjNBsB0ibYi6P4&q=85&s=cd15fec87dcdff5603344dc98e9f37b8" alt="The third step, asking for a contact email" width="1010" height="700" data-path="assets/oauth/04-contact.png" />
    </Frame>
  </Step>

  <Step title="Agree and create">
    Tick the policy box and press **Create**.

    <Frame>
      <img src="https://mintcdn.com/mcp-hub/tAnjNBsB0ibYi6P4/assets/oauth/05-create.png?fit=max&auto=format&n=tAnjNBsB0ibYi6P4&q=85&s=0e489342a243098ca8eeaf4fddc5c98e" alt="All four steps complete, with the Create button" width="1010" height="700" data-path="assets/oauth/05-create.png" />
    </Frame>
  </Step>
</Steps>

## 2. Publish it

**Skip this and your accounts will sign themselves out about once a week**,
every week, each time needing a Reconnect. Thirty seconds now avoids that.

<Steps>
  <Step title="Open Audience">
    This is the screen you land on. Go to **Audience** in the left menu.

    <Frame>
      <img src="https://mintcdn.com/mcp-hub/tAnjNBsB0ibYi6P4/assets/oauth/06-created.png?fit=max&auto=format&n=tAnjNBsB0ibYi6P4&q=85&s=8caa3f5edccbbf16baed231b2f9b480d" alt="The overview screen after the consent screen has been created" width="1300" height="640" data-path="assets/oauth/06-created.png" />
    </Frame>
  </Step>

  <Step title="Press Publish app">
    The publishing status says **Testing**. That is the setting that expires
    sign-ins every seven days. Press **Publish app**.

    <Frame>
      <img src="https://mintcdn.com/mcp-hub/tAnjNBsB0ibYi6P4/assets/oauth/07-publish-before.png?fit=max&auto=format&n=tAnjNBsB0ibYi6P4&q=85&s=ae337f523ec2c56c8483b7580ead94e9" alt="Publishing status showing Testing, with a Publish app button" width="1300" height="760" data-path="assets/oauth/07-publish-before.png" />
    </Frame>
  </Step>

  <Step title="Confirm">
    You are warned that verification may be required. Press **Confirm** anyway.
    An unverified app works perfectly well for your own accounts.

    <Frame>
      <img src="https://mintcdn.com/mcp-hub/tAnjNBsB0ibYi6P4/assets/oauth/08-publish-dialog.png?fit=max&auto=format&n=tAnjNBsB0ibYi6P4&q=85&s=1ed4994907f55fd61e22007cbb59f065" alt="The dialog asking whether to push to production" width="1400" height="900" data-path="assets/oauth/08-publish-dialog.png" />
    </Frame>
  </Step>

  <Step title="Check it took">
    It should now read **In production**.

    <Frame>
      <img src="https://mintcdn.com/mcp-hub/tAnjNBsB0ibYi6P4/assets/oauth/09-in-production.png?fit=max&auto=format&n=tAnjNBsB0ibYi6P4&q=85&s=2640317801cc0dfb64b152dd293b0a73" alt="Publishing status now reading In production" width="1300" height="760" data-path="assets/oauth/09-in-production.png" />
    </Frame>
  </Step>
</Steps>

<Note>
  Publishing does not make this available to anyone else. The only person who
  can connect an account is still whoever gets through your Google sign-in.
</Note>

## 3. Create the client

Now for the two values themselves.

<Steps>
  <Step title="Create client">
    Go to **Clients** in the left menu and press **Create client**.

    <Frame>
      <img src="https://mintcdn.com/mcp-hub/tAnjNBsB0ibYi6P4/assets/oauth/10-clients-empty.png?fit=max&auto=format&n=tAnjNBsB0ibYi6P4&q=85&s=88c4184785894772128cd5fe5ba4d8ec" alt="An empty list of OAuth clients" width="1300" height="560" data-path="assets/oauth/10-clients-empty.png" />
    </Frame>
  </Step>

  <Step title="Type, and the redirect address">
    Leave **Application type** as **Web application** and name it whatever you
    will recognise.

    Further down, under **Authorized redirect URIs**, press **Add URI** and
    paste the address the installer gave you. It is on the OAuth card, step 3,
    with a copy button beside it.

    <Frame>
      <img src="https://mintcdn.com/mcp-hub/tAnjNBsB0ibYi6P4/assets/oauth/11-client-form.png?fit=max&auto=format&n=tAnjNBsB0ibYi6P4&q=85&s=cba6f8540f8040ac3d896311f15c4087" alt="The create client form, showing the web application type and the authorised redirect URIs field" width="1010" height="1060" data-path="assets/oauth/11-client-form.png" />
    </Frame>

    <Warning>
      This address has to match exactly. Use the copy button rather than typing
      it. If it is wrong, Google refuses the connection later and says the
      redirect address does not match.
    </Warning>

    Then press **Create**.
  </Step>

  <Step title="Copy both, now">
    The **Client ID** and **Client secret** appear together.

    <Frame>
      <img src="https://mintcdn.com/mcp-hub/tAnjNBsB0ibYi6P4/assets/oauth/12-secret-warning.png?fit=max&auto=format&n=tAnjNBsB0ibYi6P4&q=85&s=0d9c082b522b2bad021aa5a48244700d" alt="Google's warning that the client secret cannot be viewed again once the dialog is closed" width="580" height="140" data-path="assets/oauth/12-secret-warning.png" />
    </Frame>

    <Warning>
      **Copy both before closing that dialog.** The secret is shown once. If you
      lose it, the only way forward is to delete the client and make another.
    </Warning>

    Paste them into the hub's add account screen and you are done here.
  </Step>
</Steps>

## How many projects you need

Almost always **one**. A personal Gmail account and a work Workspace account
can share it.

```mermaid theme={null}
flowchart LR
  A["Personal Gmail"] --> P["One project<br/>External, published"]
  B["Workspace account"] --> P
  P --> OK["Works"]
```

A second project comes up only when a Workspace account is involved, for one of
two reasons. Either the **organization blocks unverified apps**, in which case
that account cannot reach the consent screen at all, or you simply **do not
want people in the organization seeing the unverified warning**. Either way the
Workspace side gets its own project, owned by that organization, with its own
client.

[Developer Preview](/developer-preview#when-you-need-a-second-project) has the
fuller version, including why the setting is per project rather than per
client.

```mermaid theme={null}
flowchart LR
  A["Personal Gmail"] --> P1["Project A"]
  B["Workspace account<br/>(org blocks it)"] -.->|cannot consent| P1
  B --> P2["Project B<br/>owned by that org, Internal"]
  P1 --> OK1["Works"]
  P2 --> OK2["Works"]
```

Both projects then need Developer Preview approval. The installer's **Does your
Workspace org block unverified apps?** card sets the second one up and gives
you both project numbers in one line to paste into the application.

## Next

* Back to [Setting up](/quickstart) to add the account
* [Troubleshooting](/troubleshooting)
