OAuth Connection

Manage provider OAuth connection information

OAuth Connection object

Attributes

object

Object

id

String

The unique identifier for this OAuth connection

status

Enum

The current state of the connection

name

String

A human-readable name for the connection

provider

Object

config

Object

A key-value map of custom configuration options specific to the provider

scopes

Array of Strings

The list of OAuth scopes associated with this connection

client_id

String

The OAuth client ID used to authenticate with the provider

instance_id

String

The instance that this connection belongs to

template_id

String

The template ID this connection was based on, if any

created_at

Date

Timestamp when the connection was created

updated_at

Date

Timestamp when the connection was last updated

{
"object": "provider_oauth.connection",
"id": "example_id",
"status": "active",
"name": "example_name",
"provider": {
"id": "example_id",
"name": "GitHub",
"url": "https://github.com"
},
"config": {},
"scopes": [
"repo",
"repo"
],
"client_id": "example_client_id",
"instance_id": "example_instance_id",
"template_id": "example_template_id",
"created_at": "2025-08-12T09:45:16.257Z",
"updated_at": "2025-08-12T09:45:16.257Z"
}

List provider OAuth connections

List all provider OAuth connections

GEThttp://api.metorial.com/provider-oauth/connections
curl -X GET "https://api.metorial.com/provider-oauth/connections" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer metorial_sk_..."

Create provider OAuth connection

Create a new provider OAuth connection

Request Body

name

String

discovery_url

StringOptional

config

Object

client_id

String

client_secret

String

scopes

Array of Strings
POSThttp://api.metorial.com/provider-oauth/connections
curl -X POST "https://api.metorial.com/provider-oauth/connections" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer metorial_sk_..." \
-d '{
"name": "example_name",
"discovery_url": "example_discovery_url",
"config": {},
"client_id": "example_client_id",
"client_secret": "example_client_secret",
"scopes": [
"example_item"
]
}'

Get provider OAuth connection

Get information for a specific provider OAuth connection

URL Parameters

connectionId

String

The unique identifier for the connection

GEThttp://api.metorial.com/provider-oauth/connections/:connectionId
curl -X GET "https://api.metorial.com/provider-oauth/connections/con_Rm4Mnheq2bfEPhBhP7SY" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer metorial_sk_..."

Update provider OAuth connection

Update a provider OAuth connection

URL Parameters

connectionId

String

The unique identifier for the connection

Request Body

name

StringOptional

config

ObjectOptional

client_id

StringOptional

client_secret

StringOptional

scopes

Array of StringsOptional
PATCHhttp://api.metorial.com/provider-oauth/connections/:connectionId
curl -X PATCH "https://api.metorial.com/provider-oauth/connections/con_Rm4Mnheq2bfEPhBhP7SY" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer metorial_sk_..." \
-d '{
"name": "example_name",
"config": {},
"client_id": "example_client_id",
"client_secret": "example_client_secret",
"scopes": [
"example_item"
]
}'

Delete provider OAuth connection

Delete a provider OAuth connection

URL Parameters

connectionId

String

The unique identifier for the connection

DELETEhttp://api.metorial.com/provider-oauth/connections/:connectionId
curl -X DELETE "https://api.metorial.com/provider-oauth/connections/con_Rm4Mnheq2bfEPhBhP7SY" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer metorial_sk_..."