Cobalt offers both Key Based and OAuth 2.0 integration for PagerDuty. In this guide, we will look at the OAuth App setup process.

To setup your PagerDuty app in Cobalt for OAuth, you will need the following credentials from your PagerDuty account:

  • Client ID
  • Client Secret
  • Scopes

Pre-requisites

  1. PagerDuty Developer account. You can create one here.
If you haven’t already created an app in PagerDuty, you’d need to create one.

Creating an app in PagerDuty

To create a PagerDuty app and aquire the above mentioned credentials, please follow the steps mentioned below:

  1. Log in to your PagerDuty account.
  2. Click on the Integrations option in the top nav bar and select App Registration button.
Navigation for App setup
  1. Click on + New App button in the top right > Enter the Name and Description for your application and choose OAuth 2.0 as Functionality > Click on Next.
  2. Go to your Apps catalog in Cobalt > Search for PagerDuty > Settings > Use your credentials > Callback Url > Copy it.
  3. Click on + Add Redirect URL and paste the Callback Url. Select Scopes as required and click on Register App.
Setting up PagerDuty Developer app
  1. Copy the Client ID and Client Secret displayed on the screen.

Ensure that the Client ID and Secret were copied as they will be shown only once.

Getting Credentials

Configuring credentials in Cobalt

App settings page lets you configure the authentication settings for an OAuth 2.0 based application. For your customers to provide you authorization to access their data, they would first need to install your application. This page lets you set up your application credentials.

Setting up application client credentials

Cobalt lets you use pre-configured applications to play around. You can do so by selecting Use our credentials. However, if you wish to use your own application, select Use your own credentials. Provide the aquired Client Id and Client secret and save it.

Configuring Scopes

Cobalt lets you configure what permissions to ask from your users while they install your application. The scopes can be added or removed from the App settings page, under Permissions & Scopes section.

For some applications Cobalt sets mandatory scopes which cannot be removed. Additional scopes can be selected from the drop down. Cobalt also has the provision to add any custom scopes supported by the respective platform.

OAuth Scopes

Once the scopes has been added to the application in Cobalt, go to your PagerDuty account and update the scopes as added on Cobalt.

Select the OAuth App created for Cobalt > Click on Edit in the left side > Click on Manage under OAuth 2.0 > Add the scopes as added in Cobalt > Click on Confirm Changes.

If you are facing scopes missing or invalid scope error. Make sure you are not passing any custom scope not supported by the platform. And, the scopes selected here are identical to the ones selected in the platform.

Making PagerDuty App Public

In PagerDuty, a Public App allows the app to be used by anyone.

To make your app public, select App Type as Public and fill the Distribution Form provided to you.

Actions and triggers

Once the above setup is completed, you can create orchestrations of your use-cases using PagerDuty actions and triggers. Following are the set of PagerDuty actions and triggers supported by Cobalt.