Custom OAuth profiles ​

Use the endpoints below to manage custom OAuth profiles programmatically.

Rate limits ​

Custom OAuth profile resources have the following rate limits:

TypeResourceQuota
AllAll Custom OAuth profiles endpoints60 requests per minute

Quick reference ​

TypeResourceDescription
GET/api/custom_oauth_profilesList Custom OAuth profiles.
GET/api/custom_oauth_profiles/:idGet a Custom OAuth profile by ID.
POST/api/custom_oauth_profilesCreate a Custom OAuth profile.
PUT/api/custom_oauth_profiles/:idUpdate a Custom OAuth profile.
DELETE/api/custom_oauth_profiles/:idDelete a Custom OAuth profile.

List Custom OAuth profiles ​

List custom OAuth profiles. Client secrets and tokens are never returned in the response.

GET https://YOUR_DATA_CENTER/api/custom_oauth_profiles

Query parameters ​

NameTypeDescription
pageintegerPage number. Defaults to 1.
per_pageintegerPage size. Defaults to 100 (maximum is 100).

Sample request ​

shell
curl  -X GET 'https://YOUR_DATA_CENTER/api/custom_oauth_profiles' \
      -H 'Authorization: Bearer <api_token>' \
      -H 'Content-Type: application/json' \

Response ​

json
{
  "result": [
      {
        "id": 321,
        "user_id": 123,
        "name": "Acme HubSpot OAuth app",
        "provider": "hubspot",
        "data": {
          "client_id": "example_client_id"
        },
        "shared_accounts_count": 1,
        "oem_customers_count": 5,
        "created_at": "2023-01-15T11:50:32.986-07:00",
        "updated_at": "2023-01-15T11:50:32.986-07:00"
      }
    ]
}

Get Custom OAuth profile by ID ​

Retrieves a custom OAuth profile by ID. Client secrets and tokens are never returned in the response.

GET https://YOUR_DATA_CENTER/api/custom_oauth_profiles/:id

Path parameters ​

NameTypeDescription
idinteger
required
ID of the Custom OAuth profile to retrieve

Sample request ​

shell
curl  -X GET 'https://YOUR_DATA_CENTER/api/custom_oauth_profiles/:id' \
      -H 'Authorization: Bearer <api_token>' \
      -H 'Content-Type: application/json' \

Response ​

json
{
  "result": {
    "id": 321,
    "user_id": 123,
    "name": "Acme HubSpot OAuth app",
    "provider": "hubspot",
    "data": {
      "client_id": "example_client_id"
    },
    "shared_accounts_count": 1,
    "oem_customers_count": 5,
    "created_at": "2023-01-15T11:50:32.986-07:00",
    "updated_at": "2023-01-15T11:50:32.986-07:00"
  }
}

Create a Custom OAuth profile ​

Create a Custom OAuth profile.

POST https://YOUR_DATA_CENTER/api/custom_oauth_profiles

Payload ​

NameTypeDescription
namestring
required
The name of the OAuth profile.
providerstring
required
The name of the app tied to this Custom OAuth profile.
data.client_idstring
required
The Client ID of the Custom OAuth App
data.client_secretstring
required
The Client secret of the Custom OAuth App
data.tokenstring
optional
Only required for Slack Apps. The token of the Custom OAuth App

Sample request ​

shell
curl  -X POST https://YOUR_DATA_CENTER/api/custom_oauth_profiles \
      -H 'Authorization: Bearer <api_token>' \
      -H 'Content-Type: application/json' \
      -d '{
            "name": ":name",
            "provider": ":provider",
            "data": {
              "client_id": ":client_id",
              "client_secret": ":client_secret"
            }
          }'

Response ​

json
{
  "result": {
    "id": 322,
    "user_id": 123,
    "name": "My new OAuth profile",
    "provider": "hubspot",
    "data": {
      "client_id": "example_client_id"
    },
    "shared_accounts_count": 0,
    "oem_customers_count": 0,
    "created_at": "2023-01-15T11:50:32.986-07:00",
    "updated_at": "2023-01-15T11:50:32.986-07:00"
  }
}

Update a Custom OAuth profile ​

Update a Custom OAuth profile.

PUT https://YOUR_DATA_CENTER/api/custom_oauth_profiles/:id

Path parameters ​

NameTypeDescription
idinteger
required
ID of the Custom OAuth profile to update

Payload ​

NameTypeDescription
namestring
required
The name of the OAuth profile.
providerstring
required
The name of the app tied to this Custom OAuth profile.
data.client_idstring
required
The Client ID of the Custom OAuth App
data.client_secretstring
required
The Client secret of the Custom OAuth App
data.tokenstring
optional
Only required for Slack Apps. The token of the Custom OAuth App

Sample request ​

shell
curl  -X PUT https://YOUR_DATA_CENTER/api/custom_oauth_profiles/:id \
      -H 'Authorization: Bearer <api_token>' \
      -H 'Content-Type: application/json' \
      -d '{
            "name": ":name",
            "provider": ":provider",
            "data": {
              "client_id": ":client_id",
              "client_secret": ":client_secret"
            }
          }'

Response ​

json
{
  "result": {
    "id": 322,
    "user_id": 123,
    "name": "My updated OAuth profile",
    "provider": "hubspot",
    "data": {
      "client_id": "updated_client_id"
    },
    "shared_accounts_count": 0,
    "oem_customers_count": 0,
    "created_at": "2023-01-15T11:50:32.986-07:00",
    "updated_at": "2023-01-15T11:50:32.986-07:00"
  }
}

Delete a Custom OAuth profile ​

Delete a Custom OAuth profile.

DELETE https://YOUR_DATA_CENTER/api/custom_oauth_profiles/:id

Path Parameters ​

NameTypeDescription
idintegerID of the Custom OAuth profile to delete

Sample request ​

shell
curl  -X DELETE https://YOUR_DATA_CENTER/api/custom_oauth_profiles/:id \
      -H 'Authorization: Bearer <api_token>' \
      -H 'Content-Type: application/json' \

Response ​

json
{
  "result": {
    "success": true
  }
}

Last updated: