OAuth Connection
Manage provider OAuth connection information
OAuth Connection object
Attributes
items
Object{"items": {"0": {"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"]}},"object": "example_object","id": "example_id","status": "","name": "example_name","description": "example_description","metadata": "example_metadata","provider": {"id": "example_id","name": "example_name","url": "example_url","image_url": "example_image_url"},"config": {"type": "","config": "example_config","scopes": ["example_item"]},"client_id": "example_client_id","instance_id": "example_instance_id","template_id": "example_template_id","created_at": "2025-10-15T16:41:27.201Z","updated_at": "2025-10-15T16:41:27.201Z"},"pagination": {"has_more_before": false,"has_more_after": false}}
List provider OAuth connections
List all provider OAuth connections
Query Parameters
limit
NumberOptionalafter
StringOptionalbefore
StringOptionalcursor
StringOptionalorder
EnumOptionalGEThttp://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
StringOptionaldescription
StringOptionaldiscovery_url
StringOptionalconfig
Stringclient_id
Stringclient_secret
Stringscopes
Array of Stringsmetadata
StringOptionalPOSThttp://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": "example_config","client_id": "example_client_id","client_secret": "example_client_secret","scopes": ["example_item"],"metadata": "example_metadata"}'
Get provider OAuth connection
Get information for a specific provider OAuth connection
URL Parameters
connection_id
StringThe 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
StringThe unique identifier for the connection
Request Body
name
StringOptionaldescription
StringOptionalconfig
StringOptionalclient_id
StringOptionalclient_secret
StringOptionalscopes
Array of StringsOptionalmetadata
StringOptionalPATCHhttp://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": "example_config","client_id": "example_client_id","client_secret": "example_client_secret","scopes": ["example_item"],"metadata": "example_metadata"}'
Delete provider OAuth connection
Delete a provider OAuth connection
URL Parameters
connection_id
StringThe 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_..."