MetorialDocs

Provider Auth Credentials

Auth credentials store your OAuth app registration (client ID, client secret, and scopes). These are the app-level credentials you get from a service like GitHub or Slack.

The Provider Auth Credential object

provider_auth_credential.json
{
  "object": "provider.auth_credentials",
  "id": "par_4sTuVwXyZaBcDeFg",
  "type": "oauth",
  "status": "active",
  "is_default": true,
  "is_managed": true,
  "name": "GitHub OAuth",
  "description": "OAuth credentials for GitHub API",
  "metadata": {},
  "scopes": [
    "example_scopes"
  ],
  "provider_id": "pro_5gHjKlMnPqRsTuVw",
  "created_at": "2025-09-15T10:30:00.000Z",
  "updated_at": "2026-01-10T14:45:00.000Z"
}
object"provider.auth_credentials"required
idstringrequired
type"oauth"required
status"active" | "archived" | "deleted"required
is_defaultbooleanrequired
is_managedbooleanrequired
namestringrequirednullable
descriptionstringrequirednullable
metadataRecord<string, any>requirednullable
scopesstring[]requirednullable
provider_idstringrequired
created_atdaterequired
updated_atdaterequired

Endpoints

List provider auth credentials

GET/provider-auth-credentials

Returns a paginated list of provider auth credentials.

Query parameters

status"active" | "archived" or "active" | "archived"[]optional

Filter by status (active, archived)

idstring or string[]optional

Filter by credential ID(s)

provider_idstring or string[]optional

Filter by provider ID(s)

provider_auth_method_idstring or string[]optional

Filter by provider auth method ID(s)

origin"custom" | "managed" or "custom" | "managed"[]optional

Filter by credential origin (custom, managed)

searchstringoptional

Search by name or description

Example request

curl -X GET "https://api.metorial.com/provider-auth-credentials" \
  -H "Authorization: Bearer metorial_sk_io2h4..."

Get provider auth credentials

GET/provider-auth-credentials/:provider_auth_credentials_id

Retrieves specific provider auth credentials by ID.

Path parameters

provider_auth_credentials_idstringrequired

The unique identifier for the provider_auth_credentials

Example request

curl -X GET "https://api.metorial.com/provider-auth-credentials/pro_Rm4Mnheq2bfEPhBhP7SY" \
  -H "Authorization: Bearer metorial_sk_io2h4..."

Create provider auth credentials

POST/provider-auth-credentials

Creates new provider auth credentials.

Request body

provider_idstringrequired

Provider ID

namestringoptional
descriptionstringoptional
metadataRecord<string, any>optional

Custom key-value pairs for storing additional information

Example request

curl -X POST "https://api.metorial.com/provider-auth-credentials" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer metorial_sk_io2h4..." \
  -d '{
  "provider_id": "pro_5gHjKlMnPqRsTuVw",
  "name": "GitHub OAuth",
  "description": "OAuth credentials for GitHub API",
  "metadata": {},
  "config": {
    "type": "oauth",
    "client_id": "Iv1.abc123def456",
    "client_secret": "gho_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
    "scopes": [
      "repo",
      "repo"
    ]
  }
}'

Update provider auth credentials

PATCH/provider-auth-credentials/:provider_auth_credentials_id

Updates specific provider auth credentials.

Path parameters

provider_auth_credentials_idstringrequired

The unique identifier for the provider_auth_credentials

Request body

namestringoptional
descriptionstringoptional
metadataRecord<string, any>optional

Custom key-value pairs for storing additional information

client_idstringoptional
client_secretstringoptional
scopesstring[]optional

Example request

curl -X PATCH "https://api.metorial.com/provider-auth-credentials/pro_Rm4Mnheq2bfEPhBhP7SY" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer metorial_sk_io2h4..." \
  -d '{
  "name": "example_name",
  "description": "example_description",
  "metadata": {},
  "client_id": "example_client_id",
  "client_secret": "example_client_secret",
  "scopes": [
    "example_scopes"
  ]
}'

Delete provider auth credentials

DELETE/provider-auth-credentials/:provider_auth_credentials_id

Permanently deletes provider auth credentials.

Path parameters

provider_auth_credentials_idstringrequired

The unique identifier for the provider_auth_credentials

Example request

curl -X DELETE "https://api.metorial.com/provider-auth-credentials/pro_Rm4Mnheq2bfEPhBhP7SY" \
  -H "Authorization: Bearer metorial_sk_io2h4..."