OAuth Connection

Manage provider OAuth connection information

OAuth Connection object

Attributes

object

String

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

description

StringNullable

An optional description for the connection

metadata

Object

A key-value map of additional metadata for the connection

provider

Object

config

Object

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

StringNullable

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",
"status": "active",
"metadata": {},
"provider": {
"name": "GitHub",
"url": "https://github.com",
"image_url": "https://camo.metorial.com/igu4hi54high"
},
"config": {
"type": "json",
"config": {},
"scopes": [
"repo",
"repo"
]
}
}

List provider OAuth connections

List all provider OAuth connections

Query Parameters

limit

NumberOptional

after

StringOptional

before

StringOptional

cursor

StringOptional

order

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

Create provider OAuth connection

Create a new provider OAuth connection

Request Body

name

StringOptional

description

StringOptional

discovery_url

StringOptional

config

Object

A key-value map

client_id

String

client_secret

String

scopes

Array of Strings

metadata

ObjectOptional

A key-value map

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",
"description": "example_description",
"discovery_url": "example_discovery_url",
"config": {},
"client_id": "example_client_id",
"client_secret": "example_client_secret",
"scopes": [
"example_item"
],
"metadata": {}
}'

Get provider OAuth connection

Get information for a specific provider OAuth connection

URL Parameters

connection_id

String

The unique identifier for the connection

GEThttp://api.metorial.com/provider-oauth/connections/:connection_id
curl -X GET "https://api.metorial.com/provider-oauth/connections/con_Rm4Mnheq2bfEPhBhP7SY" \
-H "Authorization: Bearer metorial_sk_..."

Update provider OAuth connection

Update a provider OAuth connection

URL Parameters

connection_id

String

The unique identifier for the connection

Request Body

name

StringOptional

description

StringOptional

config

ObjectOptional

A key-value map

client_id

StringOptional

client_secret

StringOptional

scopes

Array of StringsOptional

metadata

ObjectOptional

A key-value map

PATCHhttp://api.metorial.com/provider-oauth/connections/:connection_id
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",
"description": "example_description",
"config": {},
"client_id": "example_client_id",
"client_secret": "example_client_secret",
"scopes": [
"example_item"
],
"metadata": {}
}'

Delete provider OAuth connection

Delete a provider OAuth connection

URL Parameters

connection_id

String

The unique identifier for the connection

DELETEhttp://api.metorial.com/provider-oauth/connections/:connection_id
curl -X DELETE "https://api.metorial.com/provider-oauth/connections/con_Rm4Mnheq2bfEPhBhP7SY" \
-H "Authorization: Bearer metorial_sk_..."