## Heroku integration Heroku is a cloud platform for building, running, and operating applications. Integrating Heroku with Frontegg lets your application manage apps, dynos, config, add-ons, and other platform resources on behalf of your users — all through Frontegg's integration layer. Heroku authenticates with OAuth 2.0 (Authorization Code flow), so you register an API client in your Heroku account to obtain a Client ID and Client Secret. Prerequisites - A [Heroku](https://www.heroku.com/) account - Access to your account's [Applications settings](https://dashboard.heroku.com/account/applications) ### Connect to Heroku You register an OAuth API client in the Heroku Dashboard. The client provides the **Client ID** and **Client Secret** and defines the **OAuth callback URL** that Heroku returns users to after they authorize access. #### Step 1: Open API Clients Sign in to Heroku and go to **Account settings → Applications**. Scroll to the **API Clients** section and click **Register new API client**. ![Heroku API Clients section with the Register new API client button](/assets/heroku-1.10adc97a6580d99f53a2347b3f7abbd17c1c154648652ef089a20671c0f018b0.1ce25488.png) #### Step 2: Register the client In the **Register new API client** panel: - **Name** — A memorable name, for example `Frontegg Integration`. - **OAuth callback URL** — Your Frontegg Redirect URL: `https://YOUR_MCP_GATEWAY_URL/integration-callback` Click **Register**. ![Heroku Register new API client panel with the OAuth callback URL highlighted](/assets/heroku-2.59d75ecd9f9c31ccb05ca712bcf17cf9e9d31f01644836f00fa7d1b00b75cc92.1ce25488.png) #### Step 3: Copy the Client ID and Client Secret Open the API client. Heroku displays the **Client ID** and **Client Secret**. Copy both values. Keep your Client Secret safe The Client Secret grants access to your account through the API. Treat it like a password and never expose it in client-side code or commit it to version control. If it is exposed, use **Reset API client secret** to rotate it. ![Heroku API client details showing the Client ID and Client Secret](/assets/heroku-3.2dc0b72118e1d03b1c2a6171b2270bca8c183c38f5c183ca684df463435be5de.1ce25488.png) ### Configure the Frontegg portal Once you have your **Client ID** and **Client Secret**, configure the integration in the Frontegg portal: 1. Open the **Frontegg portal** and navigate to [ENVIRONMENT] → Integrations → Heroku. 2. Enter the **Client ID** and the **Client Secret**. 3. Click **Save**. Frontegg requests the following scopes during authorization: | Scope | Description | | --- | --- | | `read` | Read access to non-protected resources | | `write` | Write access to non-protected resources | | `read-protected` | Read access, including protected resources | | `write-protected` | Write access, including protected resources | | `identity` | Read the user's account and identity information | Keep your credentials secure Never share or commit your Client Secret to version control. ### Additional resources - [Heroku OAuth documentation](https://devcenter.heroku.com/articles/oauth) - [Heroku Platform API reference](https://devcenter.heroku.com/articles/platform-api-reference) - [How to get your Redirect URL](/agen-for-work/connectors/redirect-url)