OAuth Session
Manage provider OAuth session information
OAuth Session object
Attributes
object
Stringid
StringThe unique identifier for this OAuth session
status
EnumThe current state of the session
url
StringThe URL where the user can complete the OAuth flow
connection
Objectmetadata
ObjectA key-value map of additional metadata for the session
redirect_uri
StringNullableThe URI to redirect to after the OAuth flow is complete
instance_id
StringThe instance that this session belongs to
completed_at
DateNullableTimestamp when the session was completed
created_at
DateTimestamp when the session was created
updated_at
DateTimestamp when the session was last updated
{"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": {}}
List provider OAuth sessions
List all provider OAuth sessions
Query Parameters
limit
NumberOptionalafter
StringOptionalbefore
StringOptionalcursor
StringOptionalorder
EnumOptionalsession_id
UnionOptionaloauth_connection_id
UnionOptionalcurl -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
ObjectOptionalA key-value map
redirect_uri
StringOptionalcurl -X POST "https://api.metorial.com/provider-oauth/sessions" \-H "Content-Type: application/json" \-H "Authorization: Bearer metorial_sk_..." \-d '{"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
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
curl -X DELETE "https://api.metorial.com/provider-oauth/sessions/oau_Rm4Mnheq2bfEPhBhP7SY" \-H "Authorization: Bearer metorial_sk_..."