OAuth Token Import

Manage provider OAuth import information

OAuth Token Import object

Attributes

object

String

id

String

The unique identifier for this OAuth import

status

Enum

The current state of the import

note

StringNullable

An optional note associated with the import

metadata

Object

Additional metadata associated with the import

connection_id

String

The ID of the associated OAuth connection

id_token

StringNullable

The ID token associated with the import. Only present when the import is created.

scope

StringNullable

The scope of the OAuth token

token_type

StringNullable

The type of the OAuth token

identifier

StringNullable

A hashed identifier for the access token associated with this import for security purposes

created_at

Date

Timestamp when the import was created

expires_at

DateNullable

Timestamp when the import expires

{
"object": "provider_oauth.import",
"status": "active",
"metadata": {}
}

List provider OAuth imports

List all provider OAuth imports

Query Parameters

limit

NumberOptional

after

StringOptional

before

StringOptional

cursor

StringOptional

order

EnumOptional
GEThttp://api.metorial.com/provider-oauth/token-imports
curl -X GET "https://api.metorial.com/provider-oauth/token-imports" \
-H "Authorization: Bearer metorial_sk_..."

Create provider OAuth import

Create a new provider OAuth import

Request Body

note

StringOptional

metadata

ObjectOptional

A key-value map

access_token

String

expires_at

DateOptional

id_token

StringOptional

scope

StringOptional

token_type

StringOptional
Provide exactly one of the following:
These 2 fields are mutually exclusive - include only one in your request

server_deployment_id

String

connection_id

String
POSThttp://api.metorial.com/provider-oauth/token-imports
curl -X POST "https://api.metorial.com/provider-oauth/token-imports" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer metorial_sk_..." \
-d '{
"note": "example_note",
"metadata": {},
"access_token": "example_access_token",
"expires_at": "2025-12-15T02:58:21.568Z",
"id_token": "example_id_token",
"scope": "example_scope",
"token_type": "example_token_type",
"server_deployment_id": "example_server_deployment_id"
}'

Get provider OAuth import

Get information for a specific provider OAuth import

URL Parameters

take_in_id

String

The unique identifier for the take_in

GEThttp://api.metorial.com/provider-oauth/token-imports/:take_in_id
curl -X GET "https://api.metorial.com/provider-oauth/token-imports/tak_Rm4Mnheq2bfEPhBhP7SY" \
-H "Authorization: Bearer metorial_sk_..."

Update provider OAuth import

Update information for a specific provider OAuth import

URL Parameters

take_in_id

String

The unique identifier for the take_in

Request Body

note

StringOptional

metadata

ObjectOptional

A key-value map

access_token

StringOptional

expires_at

DateOptional

id_token

StringOptional

scope

StringOptional

token_type

StringOptional
PATCHhttp://api.metorial.com/provider-oauth/token-imports/:take_in_id
curl -X PATCH "https://api.metorial.com/provider-oauth/token-imports/tak_Rm4Mnheq2bfEPhBhP7SY" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer metorial_sk_..." \
-d '{
"note": "example_note",
"metadata": {},
"access_token": "example_access_token",
"expires_at": "2025-12-15T02:58:21.569Z",
"id_token": "example_id_token",
"scope": "example_scope",
"token_type": "example_token_type"
}'