OAuth Connection
Manage provider OAuth connection information
OAuth Connection object
Attributes
object
Stringid
StringThe unique identifier for this OAuth connection
status
EnumThe current state of the connection
name
StringA human-readable name for the connection
description
StringNullableAn optional description for the connection
metadata
ObjectA key-value map of additional metadata for the connection
provider
Objectconfig
Objectclient_id
StringThe OAuth client ID used to authenticate with the provider
instance_id
StringThe instance that this connection belongs to
template_id
StringNullableThe template ID this connection was based on, if any
created_at
DateTimestamp when the connection was created
updated_at
DateTimestamp 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
NumberOptionalafter
StringOptionalbefore
StringOptionalcursor
StringOptionalorder
EnumOptionalcurl -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
StringOptionaldescription
StringOptionaldiscovery_url
StringOptionalconfig
ObjectA key-value map
client_id
Stringclient_secret
Stringscopes
Array of Stringsmetadata
ObjectOptionalA key-value map
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
StringThe unique identifier for the connection
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
StringThe unique identifier for the connection
Request Body
name
StringOptionaldescription
StringOptionalconfig
ObjectOptionalA key-value map
client_id
StringOptionalclient_secret
StringOptionalscopes
Array of StringsOptionalmetadata
ObjectOptionalA key-value map
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
StringThe unique identifier for the connection
curl -X DELETE "https://api.metorial.com/provider-oauth/connections/con_Rm4Mnheq2bfEPhBhP7SY" \-H "Authorization: Bearer metorial_sk_..."