MetorialDocs

Provider Auth Exports

An auth export lets you extract OAuth tokens or credentials from Metorial to use in other systems, avoiding duplicate authentication flows.

The Provider Auth Export object

provider_auth_export.json
{
  "object": "provider.auth_export",
  "id": "pace_7yZaBcDeFgHjKlMn",
  "note": "Exported for backup purposes",
  "ip": "192.168.1.1",
  "user_agent": "example_user_agent",
  "metadata": {},
  "auth_config": {
    "object": "provider.auth_config",
    "id": "pac_8pQrStUvWxYzAbCd",
    "type": "manual",
    "source": "manual",
    "status": "active",
    "is_default": false,
    "provider_id": "pro_5gHjKlMnPqRsTuVw",
    "name": "GitHub OAuth Token",
    "description": "OAuth token for GitHub API access",
    "metadata": {},
    "tool_filter": {
      "type": "allow_all",
      "ignore_parent_filters": false
    },
    "deployment": {
      "object": "provider.deployment#preview",
      "id": "pde_1aBcDeFgHjKlMnPq",
      "is_default": false,
      "name": "Production",
      "description": "Production deployment",
      "metadata": {},
      "provider_id": "pro_5gHjKlMnPqRsTuVw",
      "created_at": "2025-09-15T10:30:00.000Z",
      "updated_at": "2026-01-10T14:45:00.000Z"
    },
    "credentials": {
      "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": [
        "read",
        "write"
      ],
      "provider_id": "pro_5gHjKlMnPqRsTuVw",
      "created_at": "2025-09-15T10:30:00.000Z",
      "updated_at": "2026-01-10T14:45:00.000Z"
    },
    "auth_method": {
      "object": "provider.capabilities.auth_method",
      "id": "pam_2mNpQrStUvWxYzAb",
      "type": "oauth",
      "key": "oauth2",
      "name": "OAuth 2.0",
      "description": "Authenticate using OAuth 2.0",
      "capabilities": {},
      "input_schema": {
        "type": "json_schema",
        "schema": {}
      },
      "output_schema": {
        "type": "json_schema",
        "schema": {}
      },
      "scopes": [
        {
          "object": "provider.capabilities.auth_method.scope",
          "id": "pams_8tUvWxYzAbCdEfGh",
          "scope": "repo",
          "name": "Repository Access",
          "description": "Full control of private repositories"
        },
        {
          "object": "provider.capabilities.auth_method.scope",
          "id": "pams_8tUvWxYzAbCdEfGh",
          "scope": "repo",
          "name": "Repository Access",
          "description": "Full control of private repositories"
        }
      ],
      "adapters": [
        "example_adapters"
      ],
      "provider_id": "pro_5gHjKlMnPqRsTuVw",
      "provider_specification_id": "psp_9gHjKlMnPqRsTuVw",
      "created_at": "2025-09-15T10:30:00.000Z",
      "updated_at": "2026-01-10T14:45:00.000Z"
    },
    "owner_actor": {
      "id": "iac_6wQpLk2mZa8nYx4b",
      "type": "person",
      "consumer_id": "con_8kLmNp3qRs7tUv1w"
    },
    "created_at": "2025-09-15T10:30:00.000Z",
    "updated_at": "2026-01-10T14:45:00.000Z"
  },
  "provider_id": "pro_5gHjKlMnPqRsTuVw",
  "provider_deployment_id": "pde_1aBcDeFgHjKlMnPq",
  "auth_method_id": "pam_2mNpQrStUvWxYzAb",
  "credentials_id": "par_4sTuVwXyZaBcDeFg",
  "value": {},
  "created_at": "2025-09-15T10:30:00.000Z",
  "expires_at": "2026-03-15T10:30:00.000Z"
}
object"provider.auth_export"required
idstringrequired
notestringrequired
ipstringrequirednullable
user_agentstringrequirednullable
metadataRecord<string, any>requirednullable
provider_idstringrequired
provider_deployment_idstringrequirednullable
auth_method_idstringrequired
credentials_idstringrequirednullable
valueRecord<string, any>requirednullable
created_atdaterequired
expires_atdaterequirednullable

Endpoints

List provider auth exports

GET/provider-auth-config-exports

Returns a paginated list of provider auth exports.

Query parameters

idstring or string[]optional

Filter by export ID(s)

provider_idstring or string[]optional

Filter by provider ID(s)

provider_auth_credentials_idstring or string[]optional

Filter by auth credentials ID(s)

provider_auth_config_idstring or string[]optional

Filter by auth config ID(s)

Example request

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

Get provider auth export

GET/provider-auth-config-exports/:provider_auth_export_id

Retrieves a specific provider auth export by ID.

Path parameters

provider_auth_export_idstringrequired

The unique identifier for the provider_auth_export

Example request

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

Create provider auth export

POST/provider-auth-config-exports

Exports authentication credentials from a provider.

Request body

provider_auth_config_idstringrequired

Provider auth config ID

notestringrequired
metadataRecord<string, any>optional

Custom key-value pairs for storing additional information

Example request

curl -X POST "https://api.metorial.com/provider-auth-config-exports" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer metorial_sk_io2h4..." \
  -d '{
  "provider_auth_config_id": "pacf_4sTuVwXyZaBcDeFg",
  "note": "example_note",
  "metadata": {}
}'