Provider Auth Imports

An auth import lets you bring in existing OAuth tokens or credentials from another system, so users don't need to re-authenticate to use Metorial.

Provider Auth Imports object

Attributes

object

Enumprovider.auth_import

String representing the object's type

id

String

Unique auth import identifier

note

String

Note explaining the import

ip

StringNullable

IP address of the import request

user_agent

StringNullable

User agent of the import request

metadata

ObjectNullable

Custom key-value pairs for storing additional information

auth_config

Object

provider_id

String

Provider ID

provider_deployment_id

StringNullable

Deployment ID

auth_method_id

String

Auth method ID

credentials_id

StringNullable

Auth credentials ID

created_at

Date

Timestamp when created

expires_at

DateNullable

Timestamp when the import expires

{
"object": "provider.auth_import",
"id": "paci_1vWxYzAbCdEfGhJk",
"note": "Imported from previous environment",
"ip": "192.168.1.1",
"metadata": {},
"auth_config": {
"object": "provider.auth_config",
"id": "pac_8pQrStUvWxYzAbCd",
"type": "manual",
"source": "manual",
"status": "active",
"provider_id": "pro_5gHjKlMnPqRsTuVw",
"name": "GitHub OAuth Token",
"description": "OAuth token for GitHub API access",
"metadata": {},
"tool_filter": {
"type": "allow_all"
},
"deployment": {
"object": "provider.deployment#preview",
"id": "pde_1aBcDeFgHjKlMnPq",
"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": {},
"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"
}
],
"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"
},
"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",
"created_at": "2025-09-15T10:30:00.000Z",
"expires_at": "2026-03-15T10:30:00.000Z"
}

List provider auth imports

Returns a paginated list of provider auth imports.

Query Parameters

limit

NumberOptional

after

StringOptional

before

StringOptional

cursor

StringOptional

order

EnumOptional

id

UnionOptional

Filter by import ID(s)

provider_id

UnionOptional

Filter by provider ID(s)

provider_auth_credentials_id

UnionOptional

Filter by auth credentials ID(s)

provider_auth_config_id

UnionOptional

Filter by auth config ID(s)

provider_deployment_id

UnionOptional

Filter by provider deployment ID(s)

created_at

ObjectOptional

Filter provider auth import creation time by date range

updated_at

ObjectOptional

Filter provider auth import last update time by date range

GEThttps://api.metorial.com/provider-auth-config-imports
curl -X GET "https://api.metorial.com/provider-auth-config-imports" \
-H "Authorization: Bearer metorial_sk_..."

Get provider auth import

Retrieves a specific provider auth import by ID.

URL Parameters

provider_auth_import_id

String

The unique identifier for the provider_auth_import

GEThttps://api.metorial.com/provider-auth-config-imports/:provider_auth_import_id
curl -X GET "https://api.metorial.com/provider-auth-config-imports/pro_Rm4Mnheq2bfEPhBhP7SY" \
-H "Authorization: Bearer metorial_sk_..."

Create provider auth import

Imports authentication credentials for a provider.

Request Body

provider_id

StringOptional

provider_deployment_id

StringOptional

provider_auth_config_id

StringOptional

provider_auth_method_id

StringOptional

The authentication method used by these credentials

note

String

A note describing the import source or reason

metadata

ObjectOptional

Custom key-value pairs for storing additional information

value

Object

The credential data to import

POSThttps://api.metorial.com/provider-auth-config-imports
curl -X POST "https://api.metorial.com/provider-auth-config-imports" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer metorial_sk_..." \
-d '{
"provider_id": "pro_5gHjKlMnPqRsTuVw",
"provider_deployment_id": "pdp_4dEfGhJkLmNpQrSt",
"provider_auth_config_id": "pacf_4sTuVwXyZaBcDeFg",
"provider_auth_method_id": "pam_3cDeFgHjKlMnPqRs",
"note": "Migrated from legacy OAuth app",
"metadata": {},
"value": {}
}'

Get auth import schema

Retrieves the JSON Schema for importing authentication credentials.

Query Parameters

provider_id

StringOptional

provider_deployment_id

StringOptional

provider_auth_config_id

StringOptional

provider_auth_method_id

StringOptional
GEThttps://api.metorial.com/provider-auth-config-imports/schema
curl -X GET "https://api.metorial.com/provider-auth-config-imports/schema" \
-H "Authorization: Bearer metorial_sk_..."