OAuth Connection
Manage provider OAuth connection information
OAuth Connection object
Attributes
object
Objectid
StringThe unique identifier for this OAuth connection
status
EnumThe current state of the connection
name
StringA human-readable name for the connection
provider
Objectconfig
ObjectA key-value map of custom configuration options specific to the provider
scopes
Array of StringsThe list of OAuth scopes associated with this connection
client_id
StringThe OAuth client ID used to authenticate with the provider
instance_id
StringThe instance that this connection belongs to
template_id
StringThe 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","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
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
Stringdiscovery_url
StringOptionalconfig
Objectclient_id
Stringclient_secret
Stringscopes
Array of Stringscurl -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
StringThe unique identifier for the connection
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
StringThe unique identifier for the connection
Request Body
name
StringOptionalconfig
ObjectOptionalclient_id
StringOptionalclient_secret
StringOptionalscopes
Array of StringsOptionalcurl -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
StringThe unique identifier for the connection
curl -X DELETE "https://api.metorial.com/provider-oauth/connections/con_Rm4Mnheq2bfEPhBhP7SY" \-H "Content-Type: application/json" \-H "Authorization: Bearer metorial_sk_..."