OAuth Session
Manage provider OAuth session information
OAuth Session object
Attributes
items
Object{"items": {"0": {"object": "provider_oauth.session","status": "pending","connection": {"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"]}},"metadata": {}},"object": "example_object","id": "example_id","status": "","url": "example_url","connection": {"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-14T21:49:47.059Z","updated_at": "2025-10-14T21:49:47.059Z"},"metadata": "example_metadata","redirect_uri": "example_redirect_uri","instance_id": "example_instance_id","completed_at": "2025-10-14T21:49:47.059Z","created_at": "2025-10-14T21:49:47.059Z","updated_at": "2025-10-14T21:49:47.059Z"},"pagination": {"has_more_before": false,"has_more_after": false}}
List provider OAuth sessions
List all provider OAuth sessions
Query Parameters
limit
NumberOptionalafter
StringOptionalbefore
StringOptionalcursor
StringOptionalorder
EnumOptionalGEThttp://api.metorial.com/provider-oauth/sessions
curl -X GET "https://api.metorial.com/provider-oauth/sessions" \-H "Authorization: Bearer metorial_sk_..."
Create provider OAuth session
Create a new provider OAuth session
Request Body
metadata
StringOptionalredirect_uri
StringOptionalserver_deployment_id
Stringconnection_id
StringPOSThttp://api.metorial.com/provider-oauth/sessions
curl -X POST "https://api.metorial.com/provider-oauth/sessions" \-H "Content-Type: application/json" \-H "Authorization: Bearer metorial_sk_..." \-d '{"metadata": "example_metadata","redirect_uri": "example_redirect_uri","server_deployment_id": "example_server_deployment_id"}'
Get provider OAuth session
Get information for a specific provider OAuth session
URL Parameters
oauth_session_id
StringThe unique identifier for the oauth_session
GEThttp://api.metorial.com/provider-oauth/sessions/:oauth_session_id
curl -X GET "https://api.metorial.com/provider-oauth/sessions/oau_Rm4Mnheq2bfEPhBhP7SY" \-H "Authorization: Bearer metorial_sk_..."
Delete provider OAuth session
Delete a provider OAuth session
URL Parameters
oauth_session_id
StringThe unique identifier for the oauth_session
DELETEhttp://api.metorial.com/provider-oauth/sessions/:oauth_session_id
curl -X DELETE "https://api.metorial.com/provider-oauth/sessions/oau_Rm4Mnheq2bfEPhBhP7SY" \-H "Authorization: Bearer metorial_sk_..."